You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2017/07/02 00:00:12 UTC
[whimsy] branch master updated: use whimsysvn user for committers
who are member or chairs
This is an automated email from the ASF dual-hosted git repository.
rubys 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 9077f9b use whimsysvn user for committers who are member or chairs
9077f9b is described below
commit 9077f9bfe14205c51655d70e7d86b1d939535425
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Sat Jul 1 19:59:12 2017 -0400
use whimsysvn user for committers who are member or chairs
Fixes https://github.com/apache/whimsy/issues/35
---
www/committers/subscribe.cgi | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/www/committers/subscribe.cgi b/www/committers/subscribe.cgi
index 2367ace..e135787 100755
--- a/www/committers/subscribe.cgi
+++ b/www/committers/subscribe.cgi
@@ -140,9 +140,17 @@ _html do
Dir.mktmpdir do |tmpdir|
tmpdir.untaint
+ # commit using user's credentials if possible, otherwise use whisysvn
+ if not $PASSWORD
+ credentials = nil
+ elsif user.asf_member? or ASF.pmc_chairs.include? user
+ credentials = ['--username', $USER, '--password', $PASSWORD]
+ else
+ credentials = ['--username', 'whimsysvn']
+ end
+
_.system ['svn', 'checkout', SUBREQ, tmpdir,
- ['--no-auth-cache', '--non-interactive'],
- (['--username', $USER, '--password', $PASSWORD] if $PASSWORD)]
+ ['--no-auth-cache', '--non-interactive'], credentials]
Dir.chdir tmpdir do
@@ -156,8 +164,7 @@ _html do
rc = _.system ['svn', 'commit', fn,
'--message', "#{@list}@ += #{$USER}",
- ['--no-auth-cache', '--non-interactive'],
- (['--username', $USER, '--password', $PASSWORD] if $PASSWORD)]
+ ['--no-auth-cache', '--non-interactive'], credentials]
end
end
--
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].