Commit dc17fb00 authored by Chrysanthi Lagodimou's avatar Chrysanthi Lagodimou Committed by Tuğçe Nur Taş
Browse files

restrict client view parts

parent 4aad9ec8
......@@ -10,5 +10,5 @@ tr
td = link_to t_action(:show), client
td = link_to t_action(:edit), edit_client_path(client)
td
- if current_user.superadmin?
- if policy(Client).destroy?
= link_to t_action(:destroy), client, data: { confirm: t('are_you_sure')}, method: :delete
......@@ -82,10 +82,11 @@
td= t('registered_by')
td= @client.user.email
- if policy(Client).destroy?
tr
td= t_attr(:comments)
td= @client.comments
tr
td
- if policy(Client).destroy?
= t_attr(:comments)
td= @client.comments
.row
.col-xs-12
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment