Sha256: 5ef51e859efe1d16a7799db0e78f7002df472f5044db8eccc6d0f63bb68eeedb

Contents?: true

Size: 270 Bytes

Versions: 22

Compression:

Stored size: 270 Bytes

Contents

class UserRolePermit < CanTango::RolePermit
  def initialize ability
    super
  end

  protected

  def static_rules
    author_of Article do |author|
      author.can :write
    end

    can :read, Article
    can :edit, Article
    cannot :create, Article
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
cantango-0.9.4.7 spec/dummy/app/permits/roles/user_permit.rb
cantango-0.9.4.6 spec/dummy/app/permits/roles/user_permit.rb
cantango-0.9.4.5 spec/dummy/app/permits/roles/user_permit.rb
cantango-0.9.4.3 spec/dummy/app/permits/roles/user_permit.rb
cantango-0.9.4.2 spec/dummy/app/permits/roles/user_permit.rb
cantango-0.9.4.1 spec/dummy/app/permits/roles/user_permit.rb
cantango-0.9.4 spec/dummy/app/permits/roles/user_permit.rb
cantango-0.9.3.2 spec/dummy/app/permits/roles/user_permit.rb
cantango-0.8.9.5 spec/dummy/app/permits/roles/user_permit.rb
cantango-0.8.9.4 spec/dummy/app/permits/roles/user_permit.rb
cantango-0.8.9.3 spec/dummy/app/permits/roles/user_permit.rb
cantango-0.8.9.2 spec/dummy/app/permits/roles/user_permit.rb
cantango-0.8.9.1 spec/dummy/app/permits/roles/user_permit.rb
cantango-0.8.9 spec/dummy/app/permits/roles/user_permit.rb
cantango-0.8.8.1 spec/dummy/app/permits/roles/user_permit.rb
cantango-0.8.8 spec/dummy/app/permits/roles/user_permit.rb
cantango-0.8.7 spec/dummy/app/permits/roles/user_permit.rb
cantango-0.8.6.2 spec/dummy/app/permits/roles/user_permit.rb
cantango-0.8.6.1 spec/dummy/app/permits/roles/user_permit.rb
cantango-0.8.6 spec/dummy/app/permits/roles/user_permit.rb