Sha256: 06e947b798233609ff0189c678f610ae1dda82ef30aeda19804d95db66229d19
Contents?: true
Size: 338 Bytes
Versions: 9
Compression:
Stored size: 338 Bytes
Contents
module Comable class Ability include CanCan::Ability def initialize(user) user ||= Comable::User.new # guest user (not logged in) case user.role.to_sym when :admin can :manage, :all when :reporter can :read, :all else fail CanCan::AccessDenied end end end end
Version data entries
9 entries across 9 versions & 2 rubygems