Class Index [+]

Quicksearch

ActiveSambaLdap::AccountEntry::ClassMethods

Public Instance Methods

find_by_uid_number(number) click to toggle source

(Not documented)

# 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={}) click to toggle source

(Not documented)

# 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_classes() click to toggle source

(Not documented)

# File lib/active_samba_ldap/account_entry.rb, line 31
      def unix_object_classes
        if samba4?
          samba_object_classes
        else
          ["inetOrgPerson", "posixAccount"]
        end
      end

Private Instance Methods

default_dn_attribute() click to toggle source

(Not documented)

# File lib/active_samba_ldap/account_entry.rb, line 55
      def default_dn_attribute
        if samba4?
          "cn"
        else
          "uid"
        end
      end
default_group_class() click to toggle source

(Not documented)

# File lib/active_samba_ldap/account_entry.rb, line 63
      def default_group_class
        "Group"
      end
default_options() click to toggle source

(Not documented)

# File lib/active_samba_ldap/account_entry.rb, line 40
      def default_options
        {
          :dn_attribute => default_dn_attribute,
          :ldap_scope => :sub,
          :primary_group_class => default_group_class,
          :primary_group_foreign_key => "gidNumber",
          :primary_group_primary_key => "gidNumber",
          :groups_class => default_group_class,
          :groups_many => "memberUid",
          :prefix => default_prefix,
          :classes => default_classes,
          :recommended_classes => default_recommended_classes,
        }
      end
groups_options(options) click to toggle source

(Not documented)

# File lib/active_samba_ldap/account_entry.rb, line 75
      def groups_options(options)
        {
          :class => options[:groups_class],
          :many => options[:groups_many],
        }
      end
prepare_create_options(account, options) click to toggle source

(Not documented)

# File lib/active_samba_ldap/account_entry.rb, line 82
      def prepare_create_options(account, options)
        prepare_create_options_for_number("uid_number", account, options)
      end
primary_group_options(options) click to toggle source

(Not documented)

# File lib/active_samba_ldap/account_entry.rb, line 67
      def primary_group_options(options)
        {
          :class => options[:primary_group_class],
          :foreign_key => options[:primary_group_foreign_key],
          :primary_key => options[:primary_group_primary_key],
        }
      end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.