Sha256: eaf1ab0ecebf10b37b76ac1e179cb1a5f2952440d3c9972d36372f3bfc3c3a72

Contents?: true

Size: 217 Bytes

Versions: 15

Compression:

Stored size: 217 Bytes

Contents

class SuperAdminPermit < Permit::Base
  def initialize(ability, options = {})
    super
  end

  def permit?(user, options = {})    
    super
    return if !role_match? user
    
    can :manage, :all    
  end  
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
cancan-permits-0.3.12 spec/fixtures/permits/super_admin_permit.rb
cancan-permits-0.3.11 spec/fixtures/permits/super_admin_permit.rb
cancan-permits-0.3.10 spec/fixtures/permits/super_admin_permit.rb
cancan-permits-0.3.9 spec/fixtures/permits/super_admin_permit.rb
cancan-permits-0.3.8 spec/fixtures/permits/super_admin_permit.rb
cancan-permits-0.3.7 spec/fixtures/permits/super_admin_permit.rb
cancan-permits-0.3.6 spec/fixtures/permits/super_admin_permit.rb
cancan-permits-0.3.5 spec/fixtures/permits/super_admin_permit.rb
cancan-permits-0.3.4 spec/fixtures/permits/super_admin_permit.rb
cancan-permits-0.3.2 spec/fixtures/permits/super_admin_permit.rb
cancan-permits-0.3.1 spec/fixtures/permits/super_admin_permit.rb
cancan-permits-0.3.0 spec/fixtures/permits/super_admin_permit.rb
cancan-permits-0.2.9 spec/fixtures/permits/super_admin_permit.rb
cancan-permits-0.2.8 spec/fixtures/permits/super_admin_permit.rb
cancan-permits-0.2.7 spec/fixtures/permits/super_admin_permit.rb