Module: ActiveSambaLdap::AccountEntry::ClassMethods
- Defined in:
- lib/active_samba_ldap/account_entry.rb
Instance Method Summary collapse
- #find_by_uid_number(number) ⇒ Object
- #ldap_mapping(options = {}) ⇒ Object
- #unix_object_classes ⇒ Object
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) = {: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(={}) = .merge() super(()) belongs_to :primary_group, () belongs_to :groups, () end |
#unix_object_classes ⇒ Object
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 |