Organiser cannot remove admins #1459
This commit is contained in:
parent
5bb52f24a5
commit
2875f1de7b
1 changed files with 4 additions and 0 deletions
|
|
@ -189,6 +189,10 @@ class Ability
|
||||||
can [:index, :revert_object, :revert_attribute], PaperTrail::Version do |version|
|
can [:index, :revert_object, :revert_attribute], PaperTrail::Version do |version|
|
||||||
version.item_type == 'User' || (conf_ids_for_organizer.include? version.conference_id)
|
version.item_type == 'User' || (conf_ids_for_organizer.include? version.conference_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
cannot [:revert_object, :revert_attribute], PaperTrail::Version do |version|
|
||||||
|
version.item_type == 'User' && version.item.is_admin?
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def signed_in_with_cfp_role(user)
|
def signed_in_with_cfp_role(user)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue