You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by Sam Ruby <ru...@apache.org> on 2016/02/15 17:01:09 UTC
[whimsy.git] [1/1] Commit 3590367: root should be allowed too
Commit 35903672ba73ef82082facf538c63e86d6ca3e4a:
root should be allowed too
Branch: refs/heads/master
Author: Sam Ruby <ru...@intertwingly.net>
Committer: Sam Ruby <ru...@intertwingly.net>
Pusher: rubys <ru...@apache.org>
------------------------------------------------------------
www/roster/models/auth.rb | +++++++ --
www/roster/views/committee.js.rb | + -
------------------------------------------------------------
11 changes: 8 additions, 3 deletions.
------------------------------------------------------------
diff --git a/www/roster/models/auth.rb b/www/roster/models/auth.rb
index 406ba4c..cb42571 100644
--- a/www/roster/models/auth.rb
+++ b/www/roster/models/auth.rb
@@ -3,11 +3,16 @@ def self.info(env)
ASF::Auth.decode(env)
info = {id: env.user}
- secretary = ASF::Service.find('asf-secretary')
- if secretary.members.include? ASF::Person.find(env.user)
+ user = ASF::Person.find(env.user)
+
+ if ASF::Service.find('asf-secretary').members.include? user
info[:secretary] = true
end
+ if ASF::Service.find('apldap').members.include? user
+ info[:root] = true
+ end
+
info
end
end
diff --git a/www/roster/views/committee.js.rb b/www/roster/views/committee.js.rb
index 6150c65..0afaace 100644
--- a/www/roster/views/committee.js.rb
+++ b/www/roster/views/committee.js.rb
@@ -4,7 +4,7 @@
class Committee < React
def render
- auth = (@@auth.id == @committee.chair or @@auth.secretary)
+ auth = (@@auth.id == @committee.chair or @@auth.secretary or @@auth.root)
# header
_h1 do