mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
hide emails from unauthorized mods (fix #34)
This commit is contained in:
parent
1436c7ff06
commit
91c6b1f659
1 changed files with 16 additions and 6 deletions
|
@ -46,7 +46,10 @@ h1 Users
|
|||
- true ->
|
||||
|
||||
td
|
||||
= user.email
|
||||
= if can?(@conn, :edit, Philomena.Users.User) do
|
||||
= user.email
|
||||
- else
|
||||
i N/A
|
||||
|
||||
td
|
||||
= cond do
|
||||
|
@ -67,8 +70,10 @@ h1 Users
|
|||
= pretty_time user.created_at
|
||||
|
||||
td
|
||||
=> link "Edit", to: Routes.admin_user_path(@conn, :edit, user)
|
||||
' •
|
||||
= if can?(@conn, :edit, Philomena.Users.User) do
|
||||
=> link to: Routes.admin_user_path(@conn, :edit, user) do
|
||||
i.fa.fa-fw.fa-user-edit
|
||||
' Edit
|
||||
|
||||
/= if user.deleted_at do
|
||||
/ => link_to 'Reactivate', admin_user_activation_path(user), data: { confirm: t('are_you_sure') }, method: :create
|
||||
|
@ -76,9 +81,14 @@ h1 Users
|
|||
/ => link_to 'Deactivate', admin_user_activation_path(user), data: { confirm: t('are_you_sure') }, method: :delete
|
||||
/' •
|
||||
|
||||
=> link "Ban", to: Routes.admin_user_ban_path(@conn, :new, username: user.name)
|
||||
' •
|
||||
=> link "Add link", to: Routes.profile_user_link_path(@conn, :new, user)
|
||||
= if can?(@conn, :index, Philomena.Bans.User) do
|
||||
=> link to: Routes.admin_user_ban_path(@conn, :new, username: user.name) do
|
||||
i.fa.fa-fw.fa-ban
|
||||
' Ban
|
||||
= if can?(@conn, :edit, Philomena.UserLinks.UserLink) do
|
||||
=> link to: Routes.profile_user_link_path(@conn, :new, user) do
|
||||
i.fa.fa-fw.fa-link
|
||||
' Add link
|
||||
|
||||
.block__header.block__header--light
|
||||
= pagination
|
||||
|
|
Loading…
Reference in a new issue