[Major] Added require password change action
This commit is contained in:
parent
87ce588f7c
commit
3d2c62f1d9
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "strolch-wc-inspector",
|
||||
"description": "Strolch WebComponent Inspector",
|
||||
"version": "0.21.0",
|
||||
"version": "0.22.0",
|
||||
"authors": ["Robert von Burg"],
|
||||
"keywords": [
|
||||
"strolch",
|
||||
|
|
|
@ -198,6 +198,7 @@
|
|||
<paper-input label="Password" value="{{password0}}" type="password"></paper-input>
|
||||
<paper-input label="Repeat" value="{{password1}}" type="password"></paper-input>
|
||||
<div class="buttons">
|
||||
<paper-button on-tap="_requireChange">Require Change</paper-button>
|
||||
<paper-button on-tap="_clearPassword">Clear</paper-button>
|
||||
<paper-button dialog-confirm autofocus>Close</paper-button>
|
||||
<paper-button on-tap="_setPassword" autofocus>Save</paper-button>
|
||||
|
@ -445,6 +446,22 @@
|
|||
this.$.ajax.generateRequest();
|
||||
},
|
||||
|
||||
_requireChange: function (e) {
|
||||
this.dlgTitle = 'Require Password Change failed';
|
||||
this._handleAjaxResponse = function (data) {
|
||||
this.reload();
|
||||
|
||||
this.password0 = '';
|
||||
this.password1 = '';
|
||||
this.$.pwDlg.close();
|
||||
};
|
||||
|
||||
this.$.ajax.url = this.basePath + 'rest/strolch/privilege/users/' + this.user.username + '/password/state';
|
||||
this.$.ajax.method = 'PUT';
|
||||
this.$.ajax.body = {state: "RequirePasswordChange"};
|
||||
this.$.ajax.generateRequest();
|
||||
},
|
||||
|
||||
_removeUser: function (e) {
|
||||
var user = e.model.item;
|
||||
if (!confirm('Do you really want to delete user ' + user.username + ': ' + user.firstname + ' ' + user.lastname)) {
|
||||
|
|
Loading…
Reference in New Issue