diff --git a/pom.xml b/pom.xml index 82d393122920d32279c244c2406953338caaf9d4..26b78759e44e467169759b37a29543c6120555d8 100644 --- a/pom.xml +++ b/pom.xml @@ -786,6 +786,15 @@ </plugins> </build> </profile> + <profile> + <id>deploy-wls</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <modules> + <module>smp-wls-deploy</module> + </modules> + </profile> </profiles> </project> diff --git a/smp-angular/src/app/user/user-details-dialog/user-details-dialog.component.ts b/smp-angular/src/app/user/user-details-dialog/user-details-dialog.component.ts index e2ad0475dc8581d50ccf87e99a5b3f8cb58237e9..aec81251c721d30ff7b335a4ff080d7a3ae52336 100644 --- a/smp-angular/src/app/user/user-details-dialog/user-details-dialog.component.ts +++ b/smp-angular/src/app/user/user-details-dialog/user-details-dialog.component.ts @@ -128,9 +128,6 @@ export class UserDetailsDialogComponent { }; - // The password authentication is if username exists - // if it's off on clear then clear the username! - const bUserPasswordAuthentication: boolean = !!this.current.username; const bSetPassword: boolean = false; // calculate allowed roles @@ -146,9 +143,7 @@ export class UserDetailsDialogComponent { disabled: this.mode === UserDetailsDialogMode.PREFERENCES_MODE }, Validators.required), // username/password authentication - - - 'username': new FormControl({value: '', disabled: this.editMode || !bUserPasswordAuthentication}, + 'username': new FormControl({value: '', disabled: this.editMode }, !this.editMode || !this.current.username ? [Validators.nullValidator, Validators.pattern(this.usernamePattern), this.notInList(this.lookups.cachedServiceGroupOwnerList.map(a => a.username ? a.username.toLowerCase() : null))] : null), @@ -159,7 +154,7 @@ export class UserDetailsDialogComponent { 'casUserDataUrl': new FormControl({value: '', disabled: true}), - 'confirmation': new FormControl({value: '', disabled: !bUserPasswordAuthentication || !bSetPassword}), + 'confirmation': new FormControl({value: '', disabled: !bSetPassword}), // certificate authentication 'subject': new FormControl({value: '', disabled: true}, Validators.required), 'validFrom': new FormControl({value: '', disabled: true}, Validators.required), @@ -317,6 +312,10 @@ export class UserDetailsDialogComponent { } public getCurrent(): UserRo { + if (this.mode === UserDetailsDialogMode.NEW_MODE){ + this.current.username = this.userForm.get('username').value; + } + this.current.active = this.userForm.get('active').value; this.current.emailAddress = this.userForm.get('emailAddress').value; this.current.role = this.userForm.get('role').value;