Module: ActiveSambaLdap::AccountEntry::ClassMethods

Defined in:
lib/active_samba_ldap/account_entry.rb

Instance Method Summary collapse

Instance Method Details

#find_by_uid_number(number) ⇒ Object



24
25
26
27
28
29
# File 'lib/active_samba_ldap/account_entry.rb', line 24

def find_by_uid_number(number)
  options = {:objects => true}
  attribute = "uidNumber"
  value = Integer(number)
  find(:first, :filter => "(#{attribute}=#{value})")
end

#ldap_mapping(options = {}) ⇒ Object



17
18
19
20
21
22
# File 'lib/active_samba_ldap/account_entry.rb', line 17

def ldap_mapping(options={})
  options = default_options.merge(options)
  super(extract_ldap_mapping_options(options))
  belongs_to :primary_group, primary_group_options(options)
  belongs_to :groups, groups_options(options)
end

#unix_object_classesObject



31
32
33
34
35
36
37
# File 'lib/active_samba_ldap/account_entry.rb', line 31

def unix_object_classes
  if samba4?
    samba_object_classes
  else
    ["inetOrgPerson", "posixAccount"]
  end
end