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 5697126 Add cross-check of private@ subs for ASF members/private mods 5697126 is described below commit 569712657b07ad1eebcb85bba03a837df8c54b1f Author: Sebb <s...@apache.org> AuthorDate: Tue Oct 24 20:26:12 2017 +0100 Add cross-check of private@ subs for ASF members/private mods --- www/roster/models/committee.rb | 23 +++++++++++++++++++++-- www/roster/views/pmc/pmc.js.rb | 31 ++++++++++++++++++++++++++++--- 2 files changed, 49 insertions(+), 5 deletions(-) diff --git a/www/roster/models/committee.rb b/www/roster/models/committee.rb index 8abd75e..55b6f90 100644 --- a/www/roster/models/committee.rb +++ b/www/roster/models/committee.rb @@ -21,10 +21,23 @@ class Committee image = Dir["#{image_dir}/#{id}.*"].map {|path| File.basename(path)}.last moderators = nil - - if pmc.roster.include? env.user or ASF::Person.find(env.user).asf_member? + pSubs = Array.new # private@ subscribers + unknownSubs = nil # unknown private@ subscribers + currentUser = ASF::Person.find(env.user) + analysePrivateSubs = false # whether to show missing private@ subscriptions + if pmc.roster.include? env.user or currentUser.asf_member? require 'whimsy/asf/mlist' moderators, modtime = ASF::MLIST.list_moderators(pmc.mail_list) + analysePrivateSubs = currentUser.asf_member? + unless analysePrivateSubs # check for private moderator if not already allowed access + user_mail = currentUser.all_mail || [] + pMods = moderators["private@#{pmc.mail_list}.apache.org"] || [] + analysePrivateSubs = !(pMods & user_mail).empty? + end + if analysePrivateSubs + pSubs, _ = ASF::MLIST.private_subscribers(pmc.mail_list) + unknownSubs=Array.new(pSubs) # init ready to remove matched mails + end else lists = lists.select {|list, mode| mode == 'public'} end @@ -37,6 +50,10 @@ class Committee name: person.public_name, role: 'PMC member' } + if analysePrivateSubs + roster[person.id]['notSubbed'] = (person.all_mail & pSubs).empty? + unknownSubs -= person.all_mail + end roster[person.id]['ldap'] = true end @@ -70,6 +87,8 @@ class Committee project_info: info, image: image, guinea_pig: ASF::Committee::GUINEAPIGS.include?(id), + analysePrivateSubs: analysePrivateSubs, + unknownSubs: unknownSubs, } response diff --git a/www/roster/views/pmc/pmc.js.rb b/www/roster/views/pmc/pmc.js.rb index 1b3382f..7a97c75 100644 --- a/www/roster/views/pmc/pmc.js.rb +++ b/www/roster/views/pmc/pmc.js.rb @@ -27,6 +27,28 @@ class PMCMembers < Vue end end end + if @@committee.analysePrivateSubs + _h4.crosscheck! 'Cross-check of private@ list subscriptions' + _p { + _ 'PMC entries above with (*) do not appear to be subscribed to the private list.' + _br + _ 'This could be because the person is subscribed with an address that is not in their LDAP record' + } + _p { + _ 'The following subscribers to the private list do not match the known emails for any of the existing PMC members.' + _br + _ 'They could be PMC members whose emails are not listed in their LDAP record.' + _br + _ 'Or ASF members, or they could be ex-PMC members who are still subscribed.' + _br + _br + _ul { + for mail in @@committee.unknownSubs + _li @@committee.unknownSubs[mail] + end + } + } + end end def mounted() @@ -65,12 +87,15 @@ class PMCMember < Vue onClick: -> {self.toggleSelect(@@person)} end end - if @@person.member - _td { _b { _a @@person.id, href: "committer/#{@@person.id}" } } + _td { _b { _a @@person.id, href: "committer/#{@@person.id}" } + _a ' (*)', href: "committee/#{@@committee.id}#crosscheck" if @@person.notSubbed + } _td { _b @@person.name } else - _td { _a @@person.id, href: "committer/#{@@person.id}" } + _td { _a @@person.id, href: "committer/#{@@person.id}" + _a ' (*)', href: "committee/#{@@committee.id}#crosscheck" if @@person.notSubbed + } _td @@person.name end -- To stop receiving notification emails like this one, please contact ['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].