Skip to content

Commit

Permalink
ou=apps group has been deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbASF committed Apr 28, 2023
1 parent f05bf53 commit a4a412b
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 90 deletions.
32 changes: 0 additions & 32 deletions lib/whimsy/asf/ldap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1509,37 +1509,6 @@ def add(people)
end
end

# <tt>ou=apps</tt> subtree of <tt>ou=groups,dc=apache,dc=org</tt>, currently
# only used for <tt>hudson-jobadmin</tt>
class AppGroup < Service
@base = 'ou=apps,ou=groups,dc=apache,dc=org'

# return a list of App groups (cns only), from LDAP.
def self.listcns(filter='cn=*')
# Note that hudson-job-admin is under ou=hudson hence need
# to override Service.listcns and use subtree search
ASF.search_subtree(base, filter, 'cn').flatten
end

# remove people from an application group.
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

# add people to an application group.
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
end

# <tt>ou=auth</tt> subtree of <tt>ou=groups,dc=apache,dc=org</tt>, used for
# subprojects and a variety of organizational constructs (accounting,
# exec-officers, fundraising, trademarks, ...)
Expand Down Expand Up @@ -1570,5 +1539,4 @@ class RoleGroup < Service
puts newids.length
puts newids.first
ASF::RoleGroup.listcns.map {|g| puts ASF::RoleGroup.find(g).dn}
ASF::AppGroup.listcns.map {|g| puts ASF::AppGroup.find(g).dn}
end
12 changes: 0 additions & 12 deletions www/roster/models/group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ def self.list
# add authorization groups (LDAP)
groups += ASF::AuthGroup.listcns.map {|group| [group, "LDAP Auth Group"]}

# add app groups
begin # HACK to bypass missing LDAP ou=apps group
groups += ASF::AppGroup.listcns.map {|app| [app, "LDAP app group"]}
rescue LDAP::ResultError => e
Wunderbar.warn "Ignoring LDAP error: #{e.inspect}"
end

groups.sort
end

Expand All @@ -51,11 +44,6 @@ def self.serialize(id, itype=nil)
group = ASF::Service.find(id)
end

unless group.hasLDAP?
type = 'LDAP app group'
group = ASF::AppGroup.find(id)
end

if group.hasLDAP?
# LDAP group

Expand Down
44 changes: 0 additions & 44 deletions www/roster/views/actions/appgroup.json.rb

This file was deleted.

2 changes: 0 additions & 2 deletions www/roster/views/group.js.rb
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,6 @@ def post()
action = 'actions/authgroup'
elsif @@group.type == 'LDAP service'
action = 'actions/service'
elsif @@group.type == 'LDAP app group'
action = 'actions/appgroup'
else
alert "unsupported group type: #{@@group.type}"
return
Expand Down

0 comments on commit a4a412b

Please sign in to comment.