Skip to content
Snippets Groups Projects
Commit 24de5933 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #13664 TIME 0:15 add test without re-type password

parent 2529fb2d
No related merge requests found
......@@ -78,7 +78,7 @@
</div>
<div class="col-sm-12 text-center" style="padding:10px;">
<button mat-raised-button type="button" color="primary" (click)="checkAccount()"
[disabled]="functionsService.empty(alfresco.account.id) || functionsService.empty(alfresco.account.password)">{{lang.test}}</button>
[disabled]="functionsService.empty(alfresco.account.id) || (functionsService.empty(alfresco.account.password) && creationMode)">{{lang.test}}</button>
<button mat-raised-button type="submit" color="primary"
[disabled]="!alfrescoForm.valid || !validAccount()">{{lang.validate}}</button>
......
......@@ -280,7 +280,23 @@ export class AlfrescoAdministrationComponent implements OnInit {
}
checkAccount() {
this.http.post(`../rest/alfresco/checkAccounts`, { login: this.alfresco.account.id, password: this.alfresco.account.password, nodeId : this.alfresco.rootFolder }).pipe(
let alfresco = {};
if (!this.creationMode) {
alfresco = {
accountId : this.alfresco.id,
login: this.alfresco.account.id,
password: this.alfresco.account.password,
nodeId : this.alfresco.rootFolder
};
} else {
alfresco = {
login: this.alfresco.account.id,
password: this.alfresco.account.password,
nodeId : this.alfresco.rootFolder
};
}
this.http.post(`../rest/alfresco/checkAccounts`, alfresco).pipe(
tap(() => {
this.notify.success(this.lang.testSucceeded);
}),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment