Sha256: 47386b5cd47aa5fd701eaa5e29d6a503799c64396015aa938320b2d262ed7e05
Contents?: true
Size: 541 Bytes
Versions: 8
Compression:
Stored size: 541 Bytes
Contents
class Inkling::Ability include CanCan::Ability def initialize(user) if user.has_role?(:administrator) can :manage, :all else for role in user.roles for permission in role.permissions can permission.can_can_action.name.to_sym, permission.type.klass_name.constantize end end # for role in user.roles # role.permissions.each do |permission| # can permission.action.to_sym, permission.path.content_type.constantize # end # end end end end
Version data entries
8 entries across 8 versions & 1 rubygems