You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by cu...@apache.org on 2019/05/21 17:12:25 UTC

[whimsy] branch master updated: Require members/officers auth for this data

This is an automated email from the ASF dual-hosted git repository.

curcuru 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 2e7306f  Require members/officers auth for this data
2e7306f is described below

commit 2e7306f93e279c2113e87511de68ed820a3f7d13
Author: Shane Curcuru <as...@shanecurcuru.org>
AuthorDate: Tue May 21 13:12:17 2019 -0400

    Require members/officers auth for this data
---
 www/board/list-traffic.cgi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/www/board/list-traffic.cgi b/www/board/list-traffic.cgi
index fa21821..4cb29cb 100755
--- a/www/board/list-traffic.cgi
+++ b/www/board/list-traffic.cgi
@@ -10,6 +10,13 @@ require 'whimsy/asf/agenda'
 require 'date'
 require 'mail'
 
+user = ASF::Person.new($USER)
+unless user.asf_member? or ASF.pmc_chairs.include? user
+  print "Status: 401 Unauthorized\r\n"
+  print "WWW-Authenticate: Basic realm=\"ASF Members and Officers\"\r\n\r\n"
+  exit
+end
+
 SRV_MAIL = '/srv/mail/board'
 DATE = 'date'
 FROM = 'from'