mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-17 05:34:04 +00:00
commit
3f324d4e6f
4 changed files with 85 additions and 0 deletions
|
|
@ -144,6 +144,10 @@ class AdminAbility
|
|||
can :manage, Sponsor, conference_id: conf_ids
|
||||
can :manage, SponsorshipLevel, conference_id: conf_ids
|
||||
can :manage, Ticket, conference_id: conf_ids
|
||||
can :create, TicketScanning do |ticket_scanning|
|
||||
conf_id = ticket_scanning.physical_ticket.ticket_purchase.conference_id
|
||||
conf_ids.include? conf_id
|
||||
end
|
||||
can :index, Comment, commentable_type: 'Event',
|
||||
commentable_id: Event.where(program_id: Program.where(conference_id: conf_ids).pluck(:id)).pluck(:id)
|
||||
|
||||
|
|
@ -219,6 +223,10 @@ class AdminAbility
|
|||
can :manage, Question do |question|
|
||||
!(question.conferences.pluck(:id) & conf_ids_for_info_desk).empty?
|
||||
end
|
||||
can :create, TicketScanning do |ticket_scanning|
|
||||
conf_id = ticket_scanning.physical_ticket.ticket_purchase.conference_id
|
||||
conf_ids_for_info_desk.include? conf_id
|
||||
end
|
||||
|
||||
# Abilities for Role (Conference resource)
|
||||
can [:index, :show], Role do |role|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue