Ensure views only link to those actions allowed for current user
This commit is contained in:
@@ -10,8 +10,8 @@ h1 = ExternalUser.model_name.human(count: 2)
|
||||
tbody
|
||||
- @users.each do |user|
|
||||
tr
|
||||
td = user.name
|
||||
td = link_to(user.consumer, user.consumer)
|
||||
td = link_to(t('shared.show'), user)
|
||||
td = link_to_if(policy(user).show?, user.name)
|
||||
td = link_to_if(policy(user.consumer).show?, user.consumer, user.consumer)
|
||||
td = link_to(t('shared.show'), user) if policy(user).show?
|
||||
|
||||
= render('shared/pagination', collection: @users)
|
||||
|
Reference in New Issue
Block a user