whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Better error message for non-members
Date Sat, 27 Jun 2020 17:05:54 GMT
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 5017c1e  Better error message for non-members
5017c1e is described below

commit 5017c1ef4d033a19a3ca9600f9a67f72bb3e334b
Author: Sebb <sebb@apache.org>
AuthorDate: Sat Jun 27 18:05:46 2020 +0100

    Better error message for non-members
---
 www/officers/coi.cgi | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/www/officers/coi.cgi b/www/officers/coi.cgi
index 4e75f1c..f271c50 100755
--- a/www/officers/coi.cgi
+++ b/www/officers/coi.cgi
@@ -25,7 +25,15 @@ IDS = (chairs.flatten + ASF::Service['board'].members.map(&:id)).uniq
 
 # Get the list of files in this year's directory
 signerfileslist, err = ASF::SVN.svn('list', COI_CURRENT_URL, {user: $USER.dup.untaint, password:
$PASSWORD.dup.untaint})
-raise RuntimeError.new(err) unless signerfileslist
+# Currently the documents directory has limited access.
+# This includes ASF members, but does not include officers who are not members
+# Let others down gently
+unless signerfileslist
+  Wunderbar.warn err
+  print "Status: 404 Not found\r\n\r\n" # TODO better status
+  print "Sorry, cannot access COI documents\r\n"
+  exit
+end
 signerfiles = signerfileslist.split("\n")
 
 # Create the hash of {signer: signerurl} and remember user's affirmation file


Mime
View raw message