Sha256: e2ccca50677667c1e48a198e09954586487f57a179a4dd56093c57aa1f94216e

Contents?: true

Size: 487 Bytes

Versions: 5

Compression:

Stored size: 487 Bytes

Contents

class Cbac::KnownPermission < ActiveRecord::Base
  set_table_name "cbac_known_permissions"

  cattr_accessor :PERMISSION_TYPES
  @@PERMISSION_TYPES = {:context => 0, :generic => 1}

  def self.find_context_permissions(conditions = {})
    all(:conditions => conditions.merge(:permission_type => @@PERMISSION_TYPES[:context]))
  end

  def self.find_generic_permissions(conditions = {})
    all(:conditions => conditions.merge(:permission_type => @@PERMISSION_TYPES[:generic]))
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cbac-0.6.2 lib/cbac/known_permission.rb
cbac-0.5.4 lib/cbac/known_permission.rb
cbac-0.5.3 lib/cbac/known_permission.rb
cbac-0.5.2 lib/cbac/known_permission.rb
cbac-0.5.1 lib/cbac/known_permission.rb