Sha256: 3f3cbe0a9bacd47d01fc9ccb764d66d5a553668864afce1c173f9b2afcc79a22
Contents?: true
Size: 1.27 KB
Versions: 14
Compression:
Stored size: 1.27 KB
Contents
class Ability include CanCan::Ability def initialize(user) case user.try(:role).try(:name) when 'Administrator' can :manage, Classification can :manage, ClassificationType can :manage, Subject can :manage, SubjectHasClassification can :manage, SubjectHeadingType can :manage, SubjectHeadingTypeHasSubject can :manage, SubjectType can :manage, WorkHasSubject can :manage, Manifestation when 'Librarian' can :read, Classification can :read, ClassificationType can :read, Subject can :manage, SubjectHasClassification can :read, SubjectHeadingType can :read, SubjectHeadingTypeHasSubject can :read, SubjectType can :manage, WorkHasSubject can :read, Manifestation when 'User' can :read, Classification can :read, ClassificationType can :read, Subject can :read, SubjectHasClassification can :read, SubjectHeadingType can :read, WorkHasSubject can :read, Manifestation else can :read, Classification can :read, ClassificationType can :read, Subject can :read, SubjectHasClassification can :read, SubjectHeadingType can :read, WorkHasSubject can :read, Manifestation end end end
Version data entries
14 entries across 14 versions & 1 rubygems