class ASF::AppGroup

ou=apps subtree of ou=groups,dc=apache,dc=org, currently only used for hudson-jobadmin

Public Class Methods

list(filter='cn=*') click to toggle source
# File lib/whimsy/asf/ldap.rb, line 1349
def self.list(filter='cn=*')
  ASF.search_subtree(base, filter, 'cn').flatten.map {|cn| find(cn)}
end

Public Instance Methods

add(people) click to toggle source

add people to an application group.

# File lib/whimsy/asf/ldap.rb, line 1363
def add(people)
  @members = nil
  people = (Array(people) - members).map(&:dn)
  ASF::LDAP.modify(self.dn, [ASF::Base.mod_add('member', people)])
ensure
  @members = nil
end
remove(people) click to toggle source

remove people from an application group.

# File lib/whimsy/asf/ldap.rb, line 1354
def remove(people)
  @members = nil
  people = (Array(people) & members).map(&:dn)
  ASF::LDAP.modify(self.dn, [ASF::Base.mod_delete('member', people)])
ensure
  @members = nil
end