Skip to content

Commit

Permalink
Only offer ending a role if the user is allowed to
Browse files Browse the repository at this point in the history
  • Loading branch information
carlobeltrame committed Jul 14, 2021
1 parent 41a1ffe commit b75c7ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/views/roles/_fields_pbs.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
= f.labeled(:created_at) do
= f.date_field(:created_at, class: 'date span6', value: f(@role.created_at.try(:to_date)))

= f.labeled(:deleted_at) do
= f.date_field(:deleted_at, class: 'date span6', value: f(@role.deleted_at.try(:to_date)))
- if can?(:destroy, @role)
= f.labeled(:deleted_at) do
= f.date_field(:deleted_at, class: 'date span6', value: f(@role.deleted_at.try(:to_date)))

= field_set_tag t('.notification') do
%p= t('.notification_hint')

0 comments on commit b75c7ca

Please sign in to comment.