Class: MiqAeMethodService::MiqAeServiceUser

Inherits:
MiqAeServiceModelBase show all
Includes:
MiqAeServiceCustomAttributeMixin
Defined in:
lib/miq_automation_engine/service_models/miq_ae_service_user.rb

Constant Summary

Constants inherited from MiqAeServiceModelBase

MiqAeMethodService::MiqAeServiceModelBase::DELIMS, MiqAeMethodService::MiqAeServiceModelBase::EXPOSED_ATTR_BLACK_LIST, MiqAeMethodService::MiqAeServiceModelBase::SERVICE_MODEL_GLOB, MiqAeMethodService::MiqAeServiceModelBase::SERVICE_MODEL_PATH, MiqAeMethodService::MiqAeServiceModelBase::UNWISE

Instance Method Summary collapse

Methods inherited from MiqAeServiceModelBase

ar_base_model, ar_method, #ar_method, association, association=, associations, #associations, base_class, base_model, inherited, #initialize, #inspect, #inspect_all, method_missing, #method_missing, model_name_from_active_record_model, model_name_from_file, #model_suffix, normalize, #object_class, #object_send, #reload, respond_to_missing?, service_models, #tag_assign, #tag_unassign, #taggable?, taggable?, #tagged_with?, #tags, #virtual_column_names, #virtual_columns_inspect, wrap_results, #wrap_results

Methods included from Vmdb::Logging

#_log

Methods included from MiqAeServiceObjectCommon

#[], #[]=, #attributes, #attributes=, #class_name, #current_field_name, #current_field_type, #current_message, #decrypt, #id, #instance_name, #name, #namespace, #parent

Constructor Details

This class inherits a constructor from MiqAeMethodService::MiqAeServiceModelBase

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class MiqAeMethodService::MiqAeServiceModelBase

Instance Method Details

#get_ldap_attribute(name) ⇒ Object


27
28
29
30
31
32
33
# File 'lib/miq_automation_engine/service_models/miq_ae_service_user.rb', line 27

def get_ldap_attribute(name)
  ar_method do
    ldap_user = find_ldap_user
    value     = MiqLdap.get_attr(ldap_user, name.to_sym)
    value.nil? ? nil : value.dup
  end
end

#get_ldap_attribute_namesObject


20
21
22
23
24
25
# File 'lib/miq_automation_engine/service_models/miq_ae_service_user.rb', line 20

def get_ldap_attribute_names
  ar_method do
    ldap_user = find_ldap_user
    ldap_user.attribute_names
  end
end

#miq_groupObject


35
36
37
38
# File 'lib/miq_automation_engine/service_models/miq_ae_service_user.rb', line 35

def miq_group
  $miq_ae_logger.warn("[DEPRECATION] #{self.class.name}#miq_group accessor is deprecated.  Please use current_group instead.  At #{caller[0]}")
  current_group
end

#roleObject


16
17
18
# File 'lib/miq_automation_engine/service_models/miq_ae_service_user.rb', line 16

def role
  ar_method { @object.role.nil? ? nil : @object.role.name }
end