Sha256: 29d160b76f5d56b54300fe58a22e8dfa4c5eba5db0336f1e5a62578fc95d9bc3

Contents?: true

Size: 770 Bytes

Versions: 11

Compression:

Stored size: 770 Bytes

Contents

class OrganizationAbility
  include CanCan::Ability

  def initialize(organization)
    organization.kits.each do |kit|
      kit.abilities.arity < 1 ? instance_eval(&kit.abilities) : kit.abilities.call(self)
    end

    can :manage, Event, :organization_id => organization.id
    can :manage, Show, :organization_id => organization.id
    can :manage, Chart, :organization_id => organization.id
    can :manage, Ticket, :organization_id => organization.id
    can :manage, Person, :organization_id => organization.id
    can :manage, Segment, :organization_id => organization.id
    can :manage, Order, :organization_id => organization.id
    can :manage, Household, :organization_id => organization.id

    can :manage, Organization, :id => organization.id
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
artfully_ose-1.3.0.pre4 app/models/organization_ability.rb
artfully_ose-1.3.0.pre3 app/models/organization_ability.rb
artfully_ose-1.3.0.pre2 app/models/organization_ability.rb
artfully_ose-1.3.0.pre1 app/models/organization_ability.rb
artfully_ose-1.2.0 app/models/organization_ability.rb
artfully_ose-1.2.0.beta.1 app/models/organization_ability.rb
artfully_ose-1.2.0.alpha.2 app/models/organization_ability.rb
artfully_ose-1.2.0.alpha.1 app/models/organization_ability.rb
artfully_ose-1.2.0.pre.27 app/models/organization_ability.rb
artfully_ose-1.2.0.pre.26 app/models/organization_ability.rb
artfully_ose-1.2.0.pre.24 app/models/organization_ability.rb