Sha256: 806897a9a75fd78417e831a90c0c54c894cef5e4ec8567dc1f2f2ceacf6f0f38
Contents?: true
Size: 418 Bytes
Versions: 4
Compression:
Stored size: 418 Bytes
Contents
module EnjuExport class Ability include CanCan::Ability def initialize(user, ip_address = nil) case user.try(:role).try(:name) when 'Administrator' can [:read, :destroy], ExportFile when 'Librarian' can [:read, :destroy], ExportFile when 'User' can :read, ExportFile do |export_file| export_file.user == user end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems