Sha256: 9227ee3c176eaca08c859e4d0a8fe5ce6b8ff9059b5f70b59cda29bf73433eba

Contents?: true

Size: 555 Bytes

Versions: 1

Compression:

Stored size: 555 Bytes

Contents

class Cbac::KnownPermission < ActiveRecord::Base
  set_table_name "cbac_known_permissions"
  attr_readonly :permission_type, :permission_number

  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

1 entries across 1 versions & 1 rubygems

Version Path
cbac-0.6.3 lib/cbac/known_permission.rb