Sha256: 713cf9a9bd3e5c7222fd3faf178a77ba7addbad1ae19588f08c2dbed99676999

Contents?: true

Size: 529 Bytes

Versions: 2

Compression:

Stored size: 529 Bytes

Contents

module EnjuResourceMerge
  class Ability
    include CanCan::Ability

    def initialize(user, ip_address = nil)
      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
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
enju_resource_merge-0.1.0.pre7 app/models/enju_resource_merge/ability.rb
enju_resource_merge-0.1.0.pre6 app/models/enju_resource_merge/ability.rb