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 2018/02/12 03:26:12 UTC
[whimsy] branch master updated: tweak: better handling for new
ICLAs for non-committers
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 0c01352 tweak: better handling for new ICLAs for non-committers
0c01352 is described below
commit 0c01352379c30375c18053b55eac8a1d0d71db3a
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Sun Feb 11 22:24:54 2018 -0500
tweak: better handling for new ICLAs for non-committers
---
www/secretary/workbench/templates/icla2.erb | 4 +--
.../workbench/views/actions/icla2.json.rb | 36 ++++++++++++----------
2 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/www/secretary/workbench/templates/icla2.erb b/www/secretary/workbench/templates/icla2.erb
index 27afc5c..df1951a 100644
--- a/www/secretary/workbench/templates/icla2.erb
+++ b/www/secretary/workbench/templates/icla2.erb
@@ -1,9 +1,9 @@
Dear <%= @pubname %>,
This message acknowledges receipt of your additional ICLA, which has been filed in the Apache Software Foundation records.
-
+<% unless @id == 'notinavail' %>
You can change your password using https://id.apache.org .
-
+<% end %>
Warm Regards,
<%= @sig %>
diff --git a/www/secretary/workbench/views/actions/icla2.json.rb b/www/secretary/workbench/views/actions/icla2.json.rb
index 51b0d72..dddf8b7 100644
--- a/www/secretary/workbench/views/actions/icla2.json.rb
+++ b/www/secretary/workbench/views/actions/icla2.json.rb
@@ -149,7 +149,7 @@ end
# update public name in LDAP #
########################################################################
-if person.public_name != @pubname
+if person.public_name != @pubname and @id != 'notinavail'
task "change public name in LDAP" do
form do
_input value: @pubname, name: 'pubname'
@@ -208,26 +208,28 @@ end
# update email address in LDAP #
########################################################################
-task "change email address in LDAP" do
- form do
- _input value: @email, name: 'email'
- end
+if @id != 'notinavail'
+ task "change email address in LDAP" do
+ form do
+ _input value: @email, name: 'email'
+ end
- complete do
- ldap = ASF.init_ldap(true)
+ complete do
+ ldap = ASF.init_ldap(true)
- ldap.bind("uid=#{env.user.untaint},ou=people,dc=apache,dc=org",
- env.password.untaint)
+ ldap.bind("uid=#{env.user.untaint},ou=people,dc=apache,dc=org",
+ env.password.untaint)
- ldap.modify person.dn, [ASF::Base.mod_replace('mail', @email.strip)]
+ ldap.modify person.dn, [ASF::Base.mod_replace('mail', @email.strip)]
- log = ["LDAP modify: #{ldap.err2string(ldap.err)} (#{ldap.err})"]
- if ldap.err == 0
- _transcript log
- else
- _backtrace log
- end
+ log = ["LDAP modify: #{ldap.err2string(ldap.err)} (#{ldap.err})"]
+ if ldap.err == 0
+ _transcript log
+ else
+ _backtrace log
+ end
- ldap.unbind
+ ldap.unbind
+ end
end
end
--
To stop receiving notification emails like this one, please contact
rubys@apache.org.