mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 14:57:59 +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 ->
|
- true ->
|
||||||
|
|
||||||
td
|
td
|
||||||
|
= if can?(@conn, :edit, Philomena.Users.User) do
|
||||||
= user.email
|
= user.email
|
||||||
|
- else
|
||||||
|
i N/A
|
||||||
|
|
||||||
td
|
td
|
||||||
= cond do
|
= cond do
|
||||||
|
@ -67,8 +70,10 @@ h1 Users
|
||||||
= pretty_time user.created_at
|
= pretty_time user.created_at
|
||||||
|
|
||||||
td
|
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
|
/= if user.deleted_at do
|
||||||
/ => link_to 'Reactivate', admin_user_activation_path(user), data: { confirm: t('are_you_sure') }, method: :create
|
/ => 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_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)
|
= if can?(@conn, :index, Philomena.Bans.User) do
|
||||||
' •
|
=> link to: Routes.admin_user_ban_path(@conn, :new, username: user.name) do
|
||||||
=> link "Add link", to: Routes.profile_user_link_path(@conn, :new, user)
|
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
|
.block__header.block__header--light
|
||||||
= pagination
|
= pagination
|
||||||
|
|
Loading…
Reference in a new issue