[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch rel_2_5 updated. 0d9a8ca786553e5eadf31b63eccdc4ed2d9bf3db
Evergreen Git
git at git.evergreen-ils.org
Thu Feb 6 01:03:03 EST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_2_5 has been updated
via 0d9a8ca786553e5eadf31b63eccdc4ed2d9bf3db (commit)
from 100e76adcad2733534c9435218eafffca95f8341 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0d9a8ca786553e5eadf31b63eccdc4ed2d9bf3db
Author: Jeff Godin <jgodin at tadl.org>
Date: Wed Oct 30 13:20:28 2013 -0400
Skip duplicate username check when username unchanged
Changing a username, then changing back to the user's current
username results in a duplicate username detection -- a false
positive due to the API call finding a user with that username --
the current user. This prevents you from saving any other changes
you may have made to the user.
This can be prevented by skipping the duplicate username check if
the user is not new and the username in the field matches the
username stored in the in-memory Javascript representation of the
user.
There's still a potential corner case which could be avoided by
using a new/modified API call to either accept an "except this
au.id" argument or to return the au.id of the found user, but I
don't see a need for that at this point.
Signed-off-by: Jeff Godin <jgodin at tadl.org>
Signed-off-by: Ben Shum <bshum at biblio.org>
diff --git a/Open-ILS/web/js/ui/default/actor/user/register.js b/Open-ILS/web/js/ui/default/actor/user/register.js
index daccc51..629b18c 100644
--- a/Open-ILS/web/js/ui/default/actor/user/register.js
+++ b/Open-ILS/web/js/ui/default/actor/user/register.js
@@ -1380,7 +1380,9 @@ function attachWidgetEvents(fmcls, fmfield, widget) {
var input = findWidget('au', 'usrname');
var usrname = input.widget.attr('value');
- if(!usrname) {
+ // Skip username check if the value is not yet present, or if this
+ // is a patron which already existed and the usrname value is unchanged
+ if(!usrname || (!patron.isnew() && usrname == patron.usrname())) {
dupeUsrname = false;
dojo.addClass(dojo.byId('uedit-dupe-username-warning'), 'hidden');
return;
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/web/js/ui/default/actor/user/register.js | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list