Minor changes
This commit is contained in:
parent
58208c73ac
commit
6a8aca6095
5 changed files with 29 additions and 29 deletions
|
|
@ -155,17 +155,20 @@ class Ability
|
|||
can :manage, Registration, conference_id: conf_ids_for_organizer
|
||||
# To access conference/proposals
|
||||
can :manage, Event, program: { conference_id: conf_ids_for_organizer }
|
||||
can :manage, Comment
|
||||
# To access comment link in menu bar
|
||||
# can :index, Comment, commentable_type: 'Event',
|
||||
# commentable_id: Event.where(program_id: Program.where(conference_id: conf_ids_for_organizer).pluck(:id)).pluck(:id)
|
||||
can :index, Comment, commentable_type: 'Event',
|
||||
commentable_id: Event.where(program_id: Program.where(conference_id: conf_ids_for_organizer).pluck(:id)).pluck(:id)
|
||||
can :index, Comment, commentable_type: 'Track',
|
||||
commentable_id: Track.where(program_id: Program.where(conference_id: conf_ids_for_organizer).pluck(:id)).pluck(:id)
|
||||
end
|
||||
|
||||
if conf_ids_for_cfp
|
||||
# To access comment link in menu bar
|
||||
can :manage, Comment
|
||||
# can :index, Comment, commentable_type: 'Event',
|
||||
# commentable_id: Event.where(program_id: Program.where(conference_id: conf_ids_for_cfp).pluck(:id)).pluck(:id)
|
||||
can :index, Comment, commentable_type: 'Event',
|
||||
commentable_id: Event.where(program_id: Program.where(conference_id: conf_ids_for_cfp).pluck(:id)).pluck(:id)
|
||||
can :index, Comment, commentable_type: 'Track',
|
||||
commentable_id: Track.where(program_id: Program.where(conference_id: conf_ids_for_organizer).pluck(:id)).pluck(:id)
|
||||
|
||||
# To access conference/proposals
|
||||
can :manage, Event, program: { conference_id: conf_ids_for_cfp }
|
||||
end
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ class AdminAbility
|
|||
commentable_id: Event.where(program_id: Program.where(conference_id: conf_ids_for_cfp).pluck(:id)).pluck(:id)
|
||||
|
||||
can :index, Comment, commentable_type: 'Track',
|
||||
commentable_id: Track.where(program_id: Program.where(conference_id: conf_ids).pluck(:id)).pluck(:id)
|
||||
commentable_id: Track.where(program_id: Program.where(conference_id: conf_ids_for_cfp).pluck(:id)).pluck(:id)
|
||||
# Abilities for Role (Conference resource)
|
||||
can [:index, :show], Role do |role|
|
||||
role.resource_type == 'Conference' || role.resource_type == 'Track'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue