Sha256: b10328a9cfbb44a90e684d76258431d41d1102c440753b890d1575fdb1285ad3

Contents?: true

Size: 304 Bytes

Versions: 23

Compression:

Stored size: 304 Bytes

Contents

class Ability
  include CanCan::Ability

  def initialize(user)
    case user.try(:role).try(:name)
    when 'Administrator'
      can :manage, [
        Inventory,
        InventoryFile
      ]
    when 'Librarian'
      can :manage, [
        Inventory,
        InventoryFile
      ]
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
enju_inventory-0.1.11.pre5 spec/dummy/app/models/ability.rb
enju_inventory-0.1.11.pre4 spec/dummy/app/models/ability.rb
enju_inventory-0.1.11.pre2 spec/dummy/app/models/ability.rb
enju_inventory-0.1.11.pre spec/dummy/app/models/ability.rb
enju_inventory-0.1.10 spec/dummy/app/models/ability.rb
enju_inventory-0.1.9 spec/dummy/app/models/ability.rb
enju_inventory-0.0.11 spec/dummy/app/models/ability.rb
enju_inventory-0.1.7 spec/dummy/app/models/ability.rb
enju_inventory-0.1.6 spec/dummy/app/models/ability.rb
enju_inventory-0.0.10 spec/dummy/app/models/ability.rb
enju_inventory-0.1.5 spec/dummy/app/models/ability.rb
enju_inventory-0.1.4 spec/dummy/app/models/ability.rb
enju_inventory-0.0.9 spec/dummy/app/models/ability.rb
enju_inventory-0.0.8 spec/dummy/app/models/ability.rb
enju_inventory-0.1.3 spec/dummy/app/models/ability.rb
enju_inventory-0.1.2 spec/dummy/app/models/ability.rb
enju_inventory-0.0.7 spec/dummy/app/models/ability.rb
enju_inventory-0.1.1 spec/dummy/app/models/ability.rb
enju_inventory-0.0.6 spec/dummy/app/models/ability.rb
enju_inventory-0.0.5 spec/dummy/app/models/ability.rb