This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 401e302 incubator roster changes by the IPMC
401e302 is described below
commit 401e302171c8cd7018aced7872e95fe4cd1b1113
Author: Sam Ruby <[email protected]>
AuthorDate: Mon Jun 5 18:42:58 2017 -0400
incubator roster changes by the IPMC
---
www/roster/models/committee.rb | 9 +++++----
www/roster/views/actions/committee.json.rb | 21 ++++++++++++---------
www/roster/views/pmc/main.js.rb | 7 ++++++-
3 files changed, 23 insertions(+), 14 deletions(-)
diff --git a/www/roster/models/committee.rb b/www/roster/models/committee.rb
index 59958ff..40be5bc 100644
--- a/www/roster/models/committee.rb
+++ b/www/roster/models/committee.rb
@@ -3,11 +3,12 @@ class Committee
response = {}
pmc = ASF::Committee.find(id)
- committers = ASF::Group.find(id).members
- return if pmc.members.empty? and committers.empty?
+ members = pmc.members
+ committers = pmc.committers
+ return if members.empty? and committers.empty?
ASF::Committee.load_committee_info
- people = ASF::Person.preload('cn', (pmc.members + committers).uniq)
+ people = ASF::Person.preload('cn', (members + committers).uniq)
lists = ASF::Mail.lists(true).select do |list, mode|
list =~ /^#{pmc.mail_list}\b/
@@ -45,7 +46,7 @@ class Committee
report: pmc.report,
site: pmc.site,
established: pmc.established,
- ldap: Hash[pmc.members.map {|person| [person.id, person.cn]}],
+ ldap: Hash[members.map {|person| [person.id, person.cn]}],
committers: Hash[committers.map {|person| [person.id, person.cn]}],
asfmembers: (ASF.members & people).map(&:id),
roster: pmc.roster,
diff --git a/www/roster/views/actions/committee.json.rb
b/www/roster/views/actions/committee.json.rb
index ac0ad53..4973c00 100644
--- a/www/roster/views/actions/committee.json.rb
+++ b/www/roster/views/actions/committee.json.rb
@@ -7,11 +7,11 @@ if env.password
if @targets.include? 'pmc' or @targets.include? 'commit'
ASF::LDAP.bind(env.user, env.password) do
if @action == 'add'
- pmc.add(people) if pmc
- group.add(people) if group
+ pmc.add_owners(people) if pmc
+ pmc.add_committers(people) if group
elsif @action == 'remove'
- pmc.remove(people) if pmc
- group.remove(people) if group
+ pmc.remove_owners(people) if pmc
+ pmc.remove_committers(people) if group
end
end
end
@@ -94,16 +94,19 @@ if env.password
end
details = people.map {|person| person.dn}
- details << group.dn if group
- details << pmc.dn if pmc
+ if pmc.id == 'incubator'
+ details << "#{pmc.dn};attr=owner" if pmc
+ details << "#{pmc.dn};attr=member" if group
+ else
+ details << pmc.dn if pmc
+ details << group.dn if group
+ end
pmc ||= ASF::Committee.find(@project)
from = ASF::Person.find(env.user)
# identify what has changed
- if @targets.include? 'mentor'
- target = 'mentors'
- elsif @targets.include? 'pmc'
+ if @targets.include? 'pmc'
target = 'PMC'
else
target = 'committers'
diff --git a/www/roster/views/pmc/main.js.rb b/www/roster/views/pmc/main.js.rb
index 30b6cd7..3f86be1 100644
--- a/www/roster/views/pmc/main.js.rb
+++ b/www/roster/views/pmc/main.js.rb
@@ -8,7 +8,12 @@ class PMC < React
end
def render
- auth = (@@auth.id == @committee.chair or @@auth.secretary or @@auth.root)
+ if @committee.name == 'incubator'
+ auth = (@@auth.secretary or @@auth.root or
+ @committee.ldap.keys().include? @@auth.id)
+ else
+ auth = (@@auth.id == @committee.chair or @@auth.secretary or @@auth.root)
+ end
# add jump links to main sections of page
_div.breadcrumbs do
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].