Sha256: 5c8c72f88799d479251d3b44d465c796349f004918e19cd7e12d29578545bc78
Contents?: true
Size: 397 Bytes
Versions: 9
Compression:
Stored size: 397 Bytes
Contents
#module EnjuNews class Ability include CanCan::Ability def initialize(user, ip_address = nil) case user.try(:role).try(:name) when 'Administrator' can :manage, [NewsFeed, NewsPost] when 'Librarian' can :read, [NewsFeed, NewsPost] when 'User' can :read, [NewsPost] else can :read, [NewsPost] end end end #end
Version data entries
9 entries across 9 versions & 1 rubygems