[icinga-checkins] icinga.org: icinga-web/feature/reduce-name-length-3459: Reduce username length requirement to 2 - drop first/lastname min length

git at icinga.org git at icinga.org
Tue Sep 10 17:56:51 CEST 2013


Module: icinga-web
Branch: feature/reduce-name-length-3459
Commit: 47215ad1b22c0f6f7f289e10b4e39cbedcc9ff15
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=47215ad1b22c0f6f7f289e10b4e39cbedcc9ff15

Author: Markus Frosch <markus at lazyfrosch.de>
Date:   Mon Sep  9 17:03:28 2013 +0200

Reduce username length requirement to 2 - drop first/lastname min length

Changed AJAX validation and JS form settings.

refs #3459

---

 app/modules/AppKit/lib/js/admin/UserEditForm.js    |    6 ++----
 .../AppKit/validate/DataProvider/UserProvider.xml  |    8 ++------
 app/modules/AppKit/validate/Login/AjaxLogin.xml    |    2 +-
 3 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/app/modules/AppKit/lib/js/admin/UserEditForm.js b/app/modules/AppKit/lib/js/admin/UserEditForm.js
index 76ec6a0..6c51961 100644
--- a/app/modules/AppKit/lib/js/admin/UserEditForm.js
+++ b/app/modules/AppKit/lib/js/admin/UserEditForm.js
@@ -355,7 +355,7 @@ Ext.ns("AppKit.Admin");
                         name: 'user_name',
                         id: 'form_user_name',
                         anchor: '95%',
-                        minLength: 3,
+                        minLength: 2,
                         maxLength: 127
                     }, {
                         xtype: 'container',
@@ -372,7 +372,6 @@ Ext.ns("AppKit.Admin");
                                 xtype: 'textfield',
                                 anchor: '95%',
                                 allowBlank: false,
-                                minLength: 3,
                                 maxLength: 40
                             },
                             columnWidth: 0.5
@@ -387,7 +386,6 @@ Ext.ns("AppKit.Admin");
                                 fieldLabel: _('Surname'),
                                 anchor: '90%',
                                 allowBlank: false,
-                                minLength: 3,
                                 maxLength: 40
                             },
                             columnWidth: 0.5
@@ -562,4 +560,4 @@ Ext.ns("AppKit.Admin");
             }]
         }];
     };
-})();
\ No newline at end of file
+})();
diff --git a/app/modules/AppKit/validate/DataProvider/UserProvider.xml b/app/modules/AppKit/validate/DataProvider/UserProvider.xml
index 6db571a..6306f9f 100644
--- a/app/modules/AppKit/validate/DataProvider/UserProvider.xml
+++ b/app/modules/AppKit/validate/DataProvider/UserProvider.xml
@@ -71,10 +71,10 @@
             
             <validator class="string" name="user_name" required="true">
                     <argument>user_name</argument>
-                    <ae:parameter name="min">3</ae:parameter>
+                    <ae:parameter name="min">2</ae:parameter>
                     <ae:parameter name="max">127</ae:parameter>
                     <errors>
-                        <error for="min">The username you supplied is fewer than 3 characters long.</error>
+                        <error for="min">The username you supplied is fewer than 2 characters long.</error>
                         <error for="max">Your username is too long</error>
                         <error>You have to supply a username!</error>
                     </errors>
@@ -82,10 +82,8 @@
             
             <validator class="string" name="user_firstname" required="true">
                     <argument>user_firstname</argument>
-                    <ae:parameter name="min">3</ae:parameter>
                     <ae:parameter name="max">40</ae:parameter>
                     <errors>
-                        <error for="min">The firstname you supplied is fewer than 3 characters long.</error>
                         <error for="max">Your firstname is too long</error>
                         <error>You have to supply a firstname!</error>
                     </errors>
@@ -93,10 +91,8 @@
             
             <validator class="string" name="user_lastname"  required="true">
                     <argument>user_lastname</argument>
-                    <ae:parameter name="min">3</ae:parameter>
                     <ae:parameter name="max">40</ae:parameter>
                     <errors>
-                        <error for="min">The lastname you supplied is fewer than 3 characters long.</error>
                         <error for="max">Your lastname is too long</error>
                         <error>You have to supply a lastname!</error>
                     </errors>
diff --git a/app/modules/AppKit/validate/Login/AjaxLogin.xml b/app/modules/AppKit/validate/Login/AjaxLogin.xml
index 1c8d764..5dcb3c6 100644
--- a/app/modules/AppKit/validate/Login/AjaxLogin.xml
+++ b/app/modules/AppKit/validate/Login/AjaxLogin.xml
@@ -18,7 +18,7 @@
                     </errors>
                     <ae:parameters>
                         <ae:parameter name="max">127</ae:parameter>
-                        <ae:parameter name="min">3</ae:parameter>
+                        <ae:parameter name="min">2</ae:parameter>
                     </ae:parameters>
             </validator>
             





More information about the icinga-checkins mailing list