mirror of
https://github.com/unraid/webgui.git
synced 2026-03-13 14:30:29 -05:00
Allow user names up to 40 chars & allow reserved names
This commit is contained in:
@@ -62,10 +62,6 @@ function checkUsername(form) {
|
||||
swal({title:"_(Invalid user name)_",text:"_(Use only lowercase letters, digits, underscores and dashes)_",type:"error",confirmButtonText:'_(Ok)_'});
|
||||
return false;
|
||||
}
|
||||
if (username.match('^(disk[0-9]+|cache[0-9]*|parity[0-9]*|flash)$')) {
|
||||
swal({title:"_(Invalid user name)_",text:"_(Do not use reserved names)_",type:"error",confirmButtonText:'_(Ok)_'});
|
||||
return false;
|
||||
}
|
||||
if (form.userPasswordGUI.value.length > 128 || form.userPasswordConfGUI.value.length > 128) {
|
||||
swal({title:"_(Password too long)_",text:"_(Use a password up to 128 characters)_",type:"error",confirmButtonText:'_(Ok)_'});
|
||||
return false;
|
||||
@@ -163,10 +159,10 @@ $(function(){
|
||||
|
||||
<form markdown="1" name="user_edit" method="POST" action="/update.htm" target="progressFrame" onsubmit="return checkUsername(this)">
|
||||
_(User name)_:
|
||||
: <input type="text" name="userName" maxlength="32" onKeyUp="this.form.cmdUserEdit.disabled=(this.form.userName.value=='')" pattern="^[a-z_][a-z0-9_-]*[$]?$">
|
||||
: <input type="text" name="userName" maxlength="40" onKeyUp="this.form.cmdUserEdit.disabled=(this.form.userName.value=='')" pattern="^[a-z_][a-z0-9_-]*[$]?$">
|
||||
|
||||
:help1
|
||||
> Usernames may be up to 32 characters long and must start with a **lower case letter** or an underscore,
|
||||
> Usernames may be up to 40 characters long and must start with a **lower case letter** or an underscore,
|
||||
> followed by **lower case letters**, digits, underscores, or dashes. They can end with a dollar sign.
|
||||
:end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user