Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit dde8d5a6 authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

Fix UserDialog

parent 7de80494
No related branches found
No related tags found
No related merge requests found
...@@ -120,7 +120,6 @@ export class UserDetailsDialogComponent { ...@@ -120,7 +120,6 @@ export class UserDetailsDialogComponent {
} : { } : {
active: true, active: true,
username: '', username: '',
accessTokenId: '',
emailAddress: '', emailAddress: '',
password: '', password: '',
confirmation: '', confirmation: '',
...@@ -160,7 +159,7 @@ export class UserDetailsDialogComponent { ...@@ -160,7 +159,7 @@ export class UserDetailsDialogComponent {
// improve notInList validator // improve notInList validator
'password': new FormControl({value: '', disabled: !bUserPasswordAuthentication || !bSetPassword}, 'password': new FormControl({value: '', disabled: !bUserPasswordAuthentication || !bSetPassword},
[Validators.required, Validators.pattern(this.passwordPattern)]), [Validators.required, Validators.pattern(this.passwordPattern)]),
'accessTokenId': new FormControl({value: ''}), 'confirmation': new FormControl({value: ''}),
// certificate authentication // certificate authentication
'certificateToggle': new FormControl(this.current && this.current.certificate && !!this.current.certificate.certificateId), 'certificateToggle': new FormControl(this.current && this.current.certificate && !!this.current.certificate.certificateId),
'subject': new FormControl({value: '', disabled: true}, Validators.required), 'subject': new FormControl({value: '', disabled: true}, Validators.required),
...@@ -187,7 +186,6 @@ export class UserDetailsDialogComponent { ...@@ -187,7 +186,6 @@ export class UserDetailsDialogComponent {
// username/password authentication // username/password authentication
this.userForm.controls['username'].setValue(this.current.username); this.userForm.controls['username'].setValue(this.current.username);
this.userForm.controls['password'].setValue(this.current.password); this.userForm.controls['password'].setValue(this.current.password);
this.userForm.controls['accessTokenId'].setValue(this.current.accessTokenId);
// certificate authentication // certificate authentication
this.userForm.controls['subject'].setValue(this.current.certificate.subject); this.userForm.controls['subject'].setValue(this.current.certificate.subject);
this.userForm.controls['validFrom'].setValue(this.current.certificate.validFrom); this.userForm.controls['validFrom'].setValue(this.current.certificate.validFrom);
...@@ -326,7 +324,6 @@ export class UserDetailsDialogComponent { ...@@ -326,7 +324,6 @@ export class UserDetailsDialogComponent {
this.current.active = this.userForm.get('active').value; this.current.active = this.userForm.get('active').value;
this.current.emailAddress = this.userForm.get('emailAddress').value; this.current.emailAddress = this.userForm.get('emailAddress').value;
this.current.role = this.userForm.get('role').value; this.current.role = this.userForm.get('role').value;
this.current.accessTokenId = this.userForm.controls['accessTokenId'].value;
// certificate data // certificate data
if (this.userForm.get('certificateToggle')) { if (this.userForm.get('certificateToggle')) {
this.current.certificate.certificateId = this.userForm.controls['certificateId'].value; this.current.certificate.certificateId = this.userForm.controls['certificateId'].value;
...@@ -391,7 +388,6 @@ export class UserDetailsDialogComponent { ...@@ -391,7 +388,6 @@ export class UserDetailsDialogComponent {
id: null, id: null,
index: null, index: null,
username: '', username: '',
accessTokenId: '',
emailAddress: '', emailAddress: '',
role: '', role: '',
active: true, active: true,
......
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