Sha256: caed9bdf5a04fcd16aad7820334f63ccc951ffb527290e94dfd8dc7652b0c6fa
Contents?: true
Size: 289 Bytes
Versions: 8
Compression:
Stored size: 289 Bytes
Contents
class Ability include CanCan::Ability def initialize(user) user ||= User.new # guest user (not logged in) if user.has_role? :admin can :manage, :all else can :read, :all # can :read, Page do |page| # page.published? # end end end end
Version data entries
8 entries across 8 versions & 1 rubygems