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 81cea45 Don't bind to LDAP for a dry-run (or no data)
81cea45 is described below
commit 81cea45d3d314ca8d4ec60eeecdd596be3423d82
Author: Sebb <[email protected]>
AuthorDate: Sat Mar 23 10:18:19 2019 +0000
Don't bind to LDAP for a dry-run (or no data)
---
www/roster/views/actions/github.json.rb | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/www/roster/views/actions/github.json.rb
b/www/roster/views/actions/github.json.rb
index 8a4b0f8..539d11d 100644
--- a/www/roster/views/actions/github.json.rb
+++ b/www/roster/views/actions/github.json.rb
@@ -2,18 +2,18 @@
# Update GitHub username attribute for a committer
#
-# update LDAP
-_ldap.update do
- person = ASF::Person.find(@userid)
+person = ASF::Person.find(@userid)
- # report the previous value in the response
- _previous githubUsername: person.attrs['githubUsername']
+# report the previous value in the response
+_previous githubUsername: person.attrs['githubUsername']
- if @githubuser and not @dryrun
- # TODO: Hack to deal with single input field on the form
- # multiple entries are currently displayed with commas when editting
- names = @githubuser.split(/[, ]+/).uniq{|n| n.downcase} # duplicates not
allowed; case-blind
- person.modify 'githubUsername', names
+if @githubuser and not @dryrun
+ # TODO: Hack to deal with single input field on the form
+ # multiple entries are currently displayed with commas when editting
+ names = @githubuser.split(/[, ]+/).uniq{|n| n.downcase} # duplicates not
allowed; case-blind
+ # update LDAP
+ _ldap.update do
+ person.modify 'githubUsername', names
end
end