mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-17 13:44:09 +00:00
Merge efdb2cd63b into 4b6895f31d
This commit is contained in:
commit
e06a47820c
16 changed files with 118 additions and 25 deletions
|
|
@ -109,6 +109,10 @@ class Ability
|
|||
event.users.include?(user)
|
||||
end
|
||||
|
||||
can :toggle_favorite, Event do |event|
|
||||
event.scheduled?
|
||||
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