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: Allow for multiple ids
Date Fri, 06 Jul 2018 22:19:15 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 4634b3f  Allow for multiple ids
4634b3f is described below

commit 4634b3f3391061fd0aa6149c95b4ca61b1a78111
Author: Sebb <sebb@apache.org>
AuthorDate: Fri Jul 6 23:19:13 2018 +0100

    Allow for multiple ids
---
 www/project/icla/views/actions/draft-icla.json.rb | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/www/project/icla/views/actions/draft-icla.json.rb b/www/project/icla/views/actions/draft-icla.json.rb
index 7cfe2cf..ab62d7f 100644
--- a/www/project/icla/views/actions/draft-icla.json.rb
+++ b/www/project/icla/views/actions/draft-icla.json.rb
@@ -19,10 +19,13 @@
 # ipadddr
 # draft
 
-if not @apacheid.empty? and ASF::Person.find(@apacheid).icla?
-  _error "Apache ID #{@apacheid} already in use"
-  _focus :apacheId
+if not @apacheid.empty?
+  inuse = @apacheid.split(/ +/).select{|id| ASF::Person.find(id).icla?}.join(' ')
+  if inuse != ''
+    _error "Apache ID(s) '#{inuse}' already in use"
+    _focus :apacheId
   return
+  end
 end
 
 # capture (possibly forwarded) remote IP address


Mime
View raw message