Sha256: e8587ae694acf62d0c31e821ada3f53aacaff9e9331d9816d2954e7a6b32f603
Contents?: true
Size: 649 Bytes
Versions: 22
Compression:
Stored size: 649 Bytes
Contents
module AdminAccountPermits class AdminRolePermit < CanTango::RolePermit def initialize(ability, options = {}) super end def static_rules author_of(Article, :scope => :account) do |author| author.can :manage end can :manage, :all # # can :manage, :all # scope :account do |account| # account.author_of(Article) do |author| # author.can :manage # author.cannot :delete # end # # account.writer_of(Post).can :manage # end # # scope :user do |user| # user.writer_of(Comment).can :manage # end end end end
Version data entries
22 entries across 22 versions & 1 rubygems