This is an automated email from the ASF dual-hosted git repository.
sebb 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 f4ae427 Check if nonPMC has a standard LDAP group and handle
acccordingly
f4ae427 is described below
commit f4ae427c606bb8b5eea6609e18227fd15e3a1859
Author: Sebb <[email protected]>
AuthorDate: Sat Jun 1 15:29:54 2019 +0100
Check if nonPMC has a standard LDAP group and handle acccordingly
---
www/roster/models/nonpmc.rb | 2 ++
www/roster/views/nonpmc/main.js.rb | 7 ++++++-
www/roster/views/nonpmc/members.js.rb | 12 +++++++-----
3 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/www/roster/models/nonpmc.rb b/www/roster/models/nonpmc.rb
index d87d399..c38cd2e 100644
--- a/www/roster/models/nonpmc.rb
+++ b/www/roster/models/nonpmc.rb
@@ -4,6 +4,7 @@ class NonPMC
cttee = ASF::Committee.find(id)
return unless cttee.nonpmc?
+ hasLDAP = !ASF::Project[cttee.name].nil? # TODO this check perhaps belongs
in the library code
members = cttee.owners
committers = cttee.committers
# Hack to fix unusual mail_list values e.g. [email protected]
@@ -155,6 +156,7 @@ class NonPMC
report: cttee.report,
site: cttee.site,
established: cttee.established,
+ hasLDAP: hasLDAP,
ldap: members.map(&:id),
members: cttee_members,
committers: committers.map(&:id),
diff --git a/www/roster/views/nonpmc/main.js.rb
b/www/roster/views/nonpmc/main.js.rb
index 3b88940..2f6f161 100644
--- a/www/roster/views/nonpmc/main.js.rb
+++ b/www/roster/views/nonpmc/main.js.rb
@@ -79,7 +79,12 @@ class NonPMC < Vue
_ProjectSearch auth: auth, project: @nonpmc, search: @search
else
_NonPMCMembers auth: auth, nonpmc: @nonpmc
- _NonPMCCommitters auth: auth, nonpmc: @nonpmc
+ if @nonpmc.hasLDAP
+ _NonPMCCommitters auth: auth, nonpmc: @nonpmc
+ else
+ _h2 'Committers (not applicable)'
+ _p 'The committee does not have a standard LDAP setup, so no
committers are shown'
+ end
end
# mailing lists
diff --git a/www/roster/views/nonpmc/members.js.rb
b/www/roster/views/nonpmc/members.js.rb
index 20760c4..4049d92 100644
--- a/www/roster/views/nonpmc/members.js.rb
+++ b/www/roster/views/nonpmc/members.js.rb
@@ -11,7 +11,9 @@ class NonPMCMembers < Vue
def render
_h2.pmc! 'Committee (' + roster.length + ')'
_p 'Click on column name to sort'
- _p '** N.B. The status column does not currently show LDAP discrepancies.
This is because the non-PMC committees do not use LDAP in the same way
currently **'
+ unless @@nonpmc.hasLDAP
+ _p '** N.B. The status column does not show LDAP discrepancies because
the committee does not have a standard LDAP setup **'
+ end
_table.table.table_hover do
_thead do
_tr do
@@ -142,10 +144,10 @@ class NonPMCMember < Vue
elsif not @@person.date
_td.issue.clickable 'not in committee-info.txt', onClick: self.select
# TODO the LDAP groups are not set up in the usual way so this is not
all that useful at present
-# elsif not @@person.ldap
-# _td.issue.clickable 'not in LDAP', onClick: self.select
-# elsif not @@nonpmc.committers.include? @@person.id
-# _td.issue.clickable 'not in committer list', onClick: self.select
+ elsif @@nonpmc.hasLDAP && not @@person.ldap
+ _td.issue.clickable 'not in LDAP', onClick: self.select
+ elsif @@nonpmc.hasLDAP && not @@nonpmc.committers.include? @@person.id
+ _td.issue.clickable 'not in committer list', onClick: self.select
elsif @@person.id == @@nonpmc.chair
_td.chair.clickable 'chair', onClick: self.select
else