You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2017/12/10 14:41:02 UTC
[whimsy] branch master updated: Is user subbed to private@ list?
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 090e5f4 Is user subbed to private@ list?
090e5f4 is described below
commit 090e5f49ac6001afafded29beb0171bd32f56df5
Author: Sebb <se...@apache.org>
AuthorDate: Sun Dec 10 14:40:44 2017 +0000
Is user subbed to private@ list?
---
www/roster/models/committer.rb | 16 +++++++++++++++-
www/roster/views/person.js.rb | 18 +++++++++++++++++-
2 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/www/roster/models/committer.rb b/www/roster/models/committer.rb
index 71cedba..5333a07 100644
--- a/www/roster/models/committer.rb
+++ b/www/roster/models/committer.rb
@@ -157,9 +157,23 @@ class Committer
ASF::MLIST.moderates(person.all_mail, response)
end
- if env.user == id
+ auth = Auth.info(env)
+ if env.user == id or auth[:root] or auth[:secretary]
require 'whimsy/asf/mlist'
ASF::MLIST.subscriptions(person.all_mail, response)
+ # Check for missing private@ subscriptions
+ response[:privateNosub] = []
+ response[:committees].each do |id|
+ pmc = ASF::Committee.find(id)
+ pmail = "private@#{pmc.mail_list}.apache.org" rescue ''
+ subbed = false
+ response[:subscriptions].each do |sub|
+ if sub[0] == pmail
+ subbed = true
+ end
+ end
+ response[:privateNosub] << id unless subbed
+ end
end
response
diff --git a/www/roster/views/person.js.rb b/www/roster/views/person.js.rb
index 4d796cd..fd1244e 100644
--- a/www/roster/views/person.js.rb
+++ b/www/roster/views/person.js.rb
@@ -34,7 +34,23 @@ class Person < Vue
_div.name 'Committees'
_div.value do
_ul committees do |pmc|
- _li {_a pmc, href: "committee/#{pmc}"}
+ noPMCsub = false
+ _li {
+ _a pmc, href: "committee/#{pmc}"
+ if @committer.privateNosub
+ if @committer.privateNosub.include? pmc
+ noPMCsub = true
+ _b " (*)"
+ end
+ end
+ }
+ if noPMCsub
+ _p {
+ _ '(*) could not find a subscription to the private@ mailing list for this committee'
+ _br
+ _ 'Perhaps the subscription address is not listed in the LDAP record'
+ }
+ end
end
end
end
--
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].