mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Remove unnecessary ability from adminAbilities
CanCanCan can load @events and @event in EventsController by itself
This commit is contained in:
parent
c4eec6a3de
commit
a87c6e55f7
4 changed files with 4 additions and 19 deletions
|
|
@ -39,10 +39,6 @@ class AdminAbility
|
|||
event.program.cfp_open? && event.new_record?
|
||||
end
|
||||
|
||||
can [:update, :show, :index], Event do |event|
|
||||
event.users.include?(user)
|
||||
end
|
||||
|
||||
# can manage the commercials of their own events
|
||||
can :manage, Commercial, commercialable_type: 'Event', commercialable_id: user.events.pluck(:id)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue