whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [1/1] Commit 3590367: root should be allowed too
Date Mon, 15 Feb 2016 16:01:09 GMT
Commit 35903672ba73ef82082facf538c63e86d6ca3e4a:
    root should be allowed too


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@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

Mime
View raw message