Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
afdd053c
Commit
afdd053c
authored
Jan 13, 2012
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make password optional
parent
7d633d5f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
REST.pm
PVE/REST.pm
+1
-1
UserEdit.js
www/manager/dc/UserEdit.js
+11
-8
No files found.
PVE/REST.pm
View file @
afdd053c
...
@@ -275,7 +275,7 @@ my $check_permissions = sub {
...
@@ -275,7 +275,7 @@ my $check_permissions = sub {
return
1
if
$perm
->
{
user
}
&&
$perm
->
{
user
}
eq
'
all
';
return
1
if
$perm
->
{
user
}
&&
$perm
->
{
user
}
eq
'
all
';
return
1
if
$perm
->
{
user
}
&&
$perm
->
{
user
}
eq
'
arg
'
&&
return
1
if
$perm
->
{
user
}
&&
$perm
->
{
user
}
eq
'
arg
'
&&
$username
eq
$param
->
{
username
}
;
(
$username
eq
$param
->
{
username
}
||
$username
eq
$param
->
{
userid
})
;
if
(
$perm
->
{
path
}
&&
$perm
->
{
privs
})
{
if
(
$perm
->
{
path
}
&&
$perm
->
{
privs
})
{
my
$path
=
PVE::Tools::
template_replace
(
$perm
->
{
path
},
$param
);
my
$path
=
PVE::Tools::
template_replace
(
$perm
->
{
path
},
$param
);
...
...
www/manager/dc/UserEdit.js
View file @
afdd053c
...
@@ -17,7 +17,7 @@ Ext.define('PVE.dc.UserEdit', {
...
@@ -17,7 +17,7 @@ Ext.define('PVE.dc.UserEdit', {
}
else
{
}
else
{
url
=
'
/api2/extjs/access/users/
'
+
me
.
userid
;
url
=
'
/api2/extjs/access/users/
'
+
me
.
userid
;
method
=
'
PUT
'
;
method
=
'
PUT
'
;
}
}
var
validate_pw
=
function
()
{
var
validate_pw
=
function
()
{
if
(
verifypw
.
getValue
()
!==
pwfield
.
getValue
())
{
if
(
verifypw
.
getValue
()
!==
pwfield
.
getValue
())
{
...
@@ -40,8 +40,7 @@ Ext.define('PVE.dc.UserEdit', {
...
@@ -40,8 +40,7 @@ Ext.define('PVE.dc.UserEdit', {
inputType
:
'
password
'
,
inputType
:
'
password
'
,
fieldLabel
:
gettext
(
'
Password
'
),
fieldLabel
:
gettext
(
'
Password
'
),
minLength
:
5
,
minLength
:
5
,
allowBlank
:
false
,
name
:
'
password
'
,
name
:
'
password
'
,
disabled
:
true
,
disabled
:
true
,
hidden
:
true
,
hidden
:
true
,
validator
:
validate_pw
validator
:
validate_pw
...
@@ -59,6 +58,7 @@ Ext.define('PVE.dc.UserEdit', {
...
@@ -59,6 +58,7 @@ Ext.define('PVE.dc.UserEdit', {
verifypw
.
setVisible
(
false
);
verifypw
.
setVisible
(
false
);
verifypw
.
setDisabled
(
true
);
verifypw
.
setDisabled
(
true
);
}
}
};
};
var
column1
=
[
var
column1
=
[
...
@@ -136,7 +136,9 @@ Ext.define('PVE.dc.UserEdit', {
...
@@ -136,7 +136,9 @@ Ext.define('PVE.dc.UserEdit', {
},
},
submitValue
:
false
submitValue
:
false
});
});
}
}
else
{
update_passwd_field
(
me
.
userid
.
match
(
/@
([^
@
]
+
)
$/
)[
1
]);
}
var
ipanel
=
Ext
.
create
(
'
PVE.panel.InputPanel
'
,
{
var
ipanel
=
Ext
.
create
(
'
PVE.panel.InputPanel
'
,
{
column1
:
column1
,
column1
:
column1
,
...
@@ -151,6 +153,10 @@ Ext.define('PVE.dc.UserEdit', {
...
@@ -151,6 +153,10 @@ Ext.define('PVE.dc.UserEdit', {
values
.
userid
=
values
.
userid
+
'
@
'
+
realm
;
values
.
userid
=
values
.
userid
+
'
@
'
+
realm
;
}
}
if
(
!
values
.
password
)
{
delete
values
.
password
;
}
return
values
;
return
values
;
}
}
});
});
...
@@ -176,10 +182,7 @@ Ext.define('PVE.dc.UserEdit', {
...
@@ -176,10 +182,7 @@ Ext.define('PVE.dc.UserEdit', {
data
.
expire
=
null
;
data
.
expire
=
null
;
}
}
}
}
me
.
setValues
(
data
);
update_passwd_field
(
data
.
realm
);
me
.
setValues
(
data
);
}
}
});
});
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment