Allow track organizers to only add role track_organizer, and only for the track(s) they are organizing
This commit is contained in:
parent
5a1f75e4f5
commit
5317b072c0
1 changed files with 2 additions and 0 deletions
|
|
@ -292,6 +292,8 @@ class AdminAbility
|
||||||
role.resource_type == 'Conference' || role.resource_type == 'Track'
|
role.resource_type == 'Conference' || role.resource_type == 'Track'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
cannot :toggle_user, Role
|
||||||
|
|
||||||
can :toggle_user, Role do |role|
|
can :toggle_user, Role do |role|
|
||||||
role.resource_type == 'Track' && track_ids_for_track_organizer.include?(role.resource_id)
|
role.resource_type == 'Track' && track_ids_for_track_organizer.include?(role.resource_id)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue