File: group.rb

package info (click to toggle)
activeldap 1.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 6,732 kB
  • ctags: 4,523
  • sloc: ruby: 27,236; makefile: 11; sh: 1
file content (13 lines) | stat: -rw-r--r-- 611 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
class Group < ActiveLdap::Base
  ldap_mapping :dn_attribute => "cn",
               :classes => ['posixGroup']
  # Inspired by ActiveRecord, this tells ActiveLDAP that the
  # LDAP entry has a attribute which contains one or more of
  # some class |:class_name| where the attributes name is
  # |:local_key|. This means that it will call
  # :class_name.new(value_of(:local_key)) to create the objects.
  has_many :members, :class_name => "User", :wrap => "memberUid"
  has_many :primary_members, :class_name => 'User',
           :foreign_key => 'gidNumber',
           :primary_key => 'gidNumber'
end # Group