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 2018/01/23 15:59:21 UTC
[whimsy] branch master updated: Allow all access to chair info
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 7acc05d Allow all access to chair info
7acc05d is described below
commit 7acc05d565ae0a9ccfabdf8442266c95ba4af672
Author: Sebb <se...@apache.org>
AuthorDate: Tue Jan 23 15:59:19 2018 +0000
Allow all access to chair info
Avoids JS crash when rendering someone else's info
---
www/roster/models/committer.rb | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/www/roster/models/committer.rb b/www/roster/models/committer.rb
index b2979f6..34c2134 100644
--- a/www/roster/models/committer.rb
+++ b/www/roster/models/committer.rb
@@ -160,16 +160,21 @@ class Committer
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)
+ ASF::MLIST.subscriptions(person.all_mail, response) # updates response[:subscriptions]
# (Does not update the response if the digest info is not available)
ASF::MLIST.digests(person.all_mail, response)
# Check for missing private@ subscriptions
response[:privateNosub] = []
- response[:chairOf] = []
- response[:committees].each do |cttee|
- pmc = ASF::Committee.find(cttee)
- chairs = pmc.chairs.map {|x| x[:id]}
- response[:chairOf] << cttee if chairs.include?(id)
+ end
+
+ # chair info is public, so let everyone see it
+ response[:chairOf] = []
+ response[:committees].each do |cttee|
+ pmc = ASF::Committee.find(cttee)
+ chairs = pmc.chairs.map {|x| x[:id]}
+ response[:chairOf] << cttee if chairs.include?(id)
+ # mailing list info is not public ...
+ if response[:subscriptions] # did we get access to the mail?
pmail = "private@#{pmc.mail_list}.apache.org" rescue ''
subbed = false
response[:subscriptions].each do |sub|
--
To stop receiving notification emails like this one, please contact
sebb@apache.org.