7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'app/permissions/decidim/votings/polling_officer_zone/permissions.rb', line 7
def permissions
return permission_action unless permission_action.scope == :polling_officer_zone
case permission_action.subject
when :polling_officers
toggle_allow(polling_officers_for_user?) if permission_action.action == :view
when :polling_station_results, :in_person_vote
toggle_allow(polling_officer.user == user) if permission_action.action == :manage
when :user
allow! if permission_action.action == :update_profile
end
permission_action
end
|