Sha256: 83125f9c211951461ac9511c7b6e899d59a51f14d05703c568a90ef912a4e57a

Contents?: true

Size: 440 Bytes

Versions: 21

Compression:

Stored size: 440 Bytes

Contents

class Ability
  include CanCan::Ability

  def initialize(user)
    case user.try(:role).try(:name)
    when 'Administrator'
      can :manage, [
        PatronMerge,
        PatronMergeList,
        SeriesStatementMerge,
        SeriesStatementMergeList
      ]
    when 'Librarian'
      can :manage, [
        PatronMerge,
        PatronMergeList,
        SeriesStatementMerge,
        SeriesStatementMergeList
      ]
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
enju_resource_merge-0.1.0.pre5 spec/dummy/app/models/ability.rb
enju_resource_merge-0.1.0.pre4 spec/dummy/app/models/ability.rb
enju_resource_merge-0.1.0.pre3 spec/dummy/app/models/ability.rb
enju_resource_merge-0.1.0.pre2 spec/dummy/app/models/ability.rb
enju_resource_merge-0.1.0.pre spec/dummy/app/models/ability.rb
enju_resource_merge-0.0.17 spec/dummy/app/models/ability.rb
enju_resource_merge-0.0.16 spec/dummy/app/models/ability.rb
enju_resource_merge-0.0.15 spec/dummy/app/models/ability.rb
enju_resource_merge-0.0.14 spec/dummy/app/models/ability.rb
enju_resource_merge-0.0.13 spec/dummy/app/models/ability.rb
enju_resource_merge-0.0.12 spec/dummy/app/models/ability.rb
enju_resource_merge-0.0.11 spec/dummy/app/models/ability.rb
enju_resource_merge-0.0.10 spec/dummy/app/models/ability.rb
enju_resource_merge-0.0.9 spec/dummy/app/models/ability.rb
enju_resource_merge-0.0.8 spec/dummy/app/models/ability.rb
enju_resource_merge-0.0.7 spec/dummy/app/models/ability.rb
enju_resource_merge-0.0.6 spec/dummy/app/models/ability.rb
enju_resource_merge-0.0.5 spec/dummy/app/models/ability.rb
enju_resource_merge-0.0.4 spec/dummy/app/models/ability.rb
enju_resource_merge-0.0.3 spec/dummy/app/models/ability.rb