updated rails to 4.2.4
This commit is contained in:
parent
37697517df
commit
42e8bb11ea
55 changed files with 766 additions and 365 deletions
|
|
@ -88,12 +88,13 @@ class Ability
|
|||
# Abilities from not_signed_in and signed_in are also inherited
|
||||
signed_in(user)
|
||||
|
||||
signed_in_with_organizer_role(user)
|
||||
signed_in_with_cfp_role(user)
|
||||
signed_in_with_info_desk_role(user)
|
||||
signed_in_with_volunteers_coordinator_role(user)
|
||||
signed_in_with_organizer_role(user) if user.has_role? :organizer, :any
|
||||
signed_in_with_cfp_role(user) if user.has_role? :cfp, :any
|
||||
signed_in_with_info_desk_role(user) if user.has_role? :info_desk, :any
|
||||
signed_in_with_volunteers_coordinator_role(user) if user.has_role? :volunteer_coordinator, :any
|
||||
|
||||
# for users with any role
|
||||
can :access, Admin
|
||||
can [:show], Conference
|
||||
can :index, Commercial, commercialable_type: 'Conference'
|
||||
cannot [:edit, :update, :destroy], Question, global: true
|
||||
|
|
@ -137,6 +138,8 @@ class Ability
|
|||
can :manage, Sponsor, conference_id: conf_ids_for_organizer
|
||||
can :manage, SponsorshipLevel, conference_id: conf_ids_for_organizer
|
||||
can :manage, Ticket, conference_id: conf_ids_for_organizer
|
||||
can :index, Comment, commentable_type: 'Event',
|
||||
commentable_id: Event.where(conference_id: conf_ids_for_organizer).pluck(:id)
|
||||
end
|
||||
|
||||
def signed_in_with_cfp_role(user)
|
||||
|
|
@ -155,6 +158,8 @@ class Ability
|
|||
can :manage, CallForPaper, conference_id: conf_ids_for_cfp
|
||||
can :manage, Commercial, commercialable_type: 'Event',
|
||||
commercialable_id: Event.where(conference_id: conf_ids_for_cfp).pluck(:id)
|
||||
can :index, Comment, commentable_type: 'Event',
|
||||
commentable_id: Event.where(conference_id: conf_ids_for_cfp).pluck(:id)
|
||||
end
|
||||
|
||||
def signed_in_with_info_desk_role(user)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue