[open-ils-commits] r11644 - trunk/Open-ILS/web/opac/skin/default/js
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Dec 22 10:48:08 EST 2008
Author: erickson
Date: 2008-12-22 10:48:06 -0500 (Mon, 22 Dec 2008)
New Revision: 11644
Modified:
trunk/Open-ILS/web/opac/skin/default/js/sidebar.js
Log:
test the patron password against the org unit setting regex if it exists
Modified: trunk/Open-ILS/web/opac/skin/default/js/sidebar.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/sidebar.js 2008-12-21 05:26:16 UTC (rev 11643)
+++ trunk/Open-ILS/web/opac/skin/default/js/sidebar.js 2008-12-22 15:48:06 UTC (rev 11644)
@@ -121,7 +121,25 @@
}
}
+var pwRegexSetting;
function strongPassword(pass, alrt) {
+
+ /* first, let's see if there is a configured regex */
+ if(!pwRegexSetting) {
+ var regex = fetchOrgSettingDefault(G.user.home_ou(), 'global.password_regex');
+ if(regex) {
+ if(pass.match(new RegExp(regex))) {
+ return true;
+ } else {
+ if(alrt)
+ alert($('pw_not_strong').innerHTML);
+ return false;
+ }
+ }
+ }
+
+ /* no regex configured, use the default */
+
var good = false;
do {
More information about the open-ils-commits
mailing list