Add :accept booth to ability

This commit is contained in:
nasia 2017-08-15 18:02:51 +03:00 committed by nasia-sam
parent e73218b5ca
commit 52cde784fa
6 changed files with 68 additions and 60 deletions

View file

@ -74,6 +74,11 @@ class AdminAbility
cannot :destroy, Track do |track|
track.self_organized?
end
# Can't accept a booth when booth_limit is reached
cannot :accept, Booth do |booth|
conference = booth.conference
conference.maximum_accepted_booths?
end
end
# Abilities for signed in users with roles