class PM::UserAttribute
A user attribute in a policy machine.
Public Class Methods
all(pm_storage_adapter, options = {})
click to toggle source
Return all policy elements of a particular type (e.g. all users)
# File lib/policy_machine/policy_element.rb, line 167 def self.all(pm_storage_adapter, options = {}) pm_storage_adapter.find_all_of_type_user_attribute(options).map do |stored_pe| convert_stored_pe_to_pe(stored_pe, pm_storage_adapter, PM::UserAttribute) end end
create(unique_identifier, policy_machine_uuid, pm_storage_adapter, extra_attributes = {})
click to toggle source
# File lib/policy_machine/policy_element.rb, line 160 def self.create(unique_identifier, policy_machine_uuid, pm_storage_adapter, extra_attributes = {}) new_pe = new(unique_identifier, policy_machine_uuid, pm_storage_adapter, nil, extra_attributes) new_pe.stored_pe = pm_storage_adapter.add_user_attribute(unique_identifier, policy_machine_uuid, extra_attributes) new_pe end
Protected Instance Methods
allowed_assignee_classes()
click to toggle source
# File lib/policy_machine/policy_element.rb, line 174 def allowed_assignee_classes [UserAttribute, PolicyClass] end