Sha256: dfca13b7e42ce7f8913f5c834c5243f99370316bb41fcd92594060ac6187ab1a
Contents?: true
Size: 632 Bytes
Versions: 22
Compression:
Stored size: 632 Bytes
Contents
module AdminAccountPermits class AdminRolePermit < CanTango::RolePermit def initialize(ability) super end protected def static_rules author_of(Article) 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