root/resilient#3 Melhorias no registo de utilizadores

This commit is contained in:
Orlando M Guerreiro 2025-06-04 21:38:42 +01:00
parent 2aa75f0e13
commit af63377a1e
11 changed files with 186 additions and 15 deletions

View file

@ -137,6 +137,34 @@
</select>
</div>
<div class="form-check">
<label class="form-check-label" for="allowUserPwdAuthentication">
<input
class="form-check-input"
[attr.disabled]="editForm.value.id === undefined ? 'disabled' : null"
type="checkbox"
id="allowUserPwdAuthentication"
name="allowUserPwdAuthentication"
formControlName="allowUserPwdAuthentication"
/>
<span jhiTranslate="userManagement.allowUserPwdAuthentication">Permite autenticação Utilizador+Password</span>
</label>
</div>
<div class="form-check">
<label class="form-check-label" for="allowSamlAuthentication">
<input
class="form-check-input"
[attr.disabled]="editForm.value.id === undefined ? 'disabled' : null"
type="checkbox"
id="allowSamlAuthentication"
name="allowSamlAuthentication"
formControlName="allowSamlAuthentication"
/>
<span jhiTranslate="userManagement.allowSamlAuthentication">Permite autenticação SAML2</span>
</label>
</div>
<button type="button" class="btn btn-secondary" (click)="previousState()">
<fa-icon icon="ban"></fa-icon>&nbsp;<span jhiTranslate="entity.action.cancel">Cancelar</span>
</button>

View file

@ -52,6 +52,8 @@ export default class UserManagementUpdateComponent implements OnInit {
langKey: new FormControl(userTemplate.langKey, { nonNullable: true }),
authorities: new FormControl(userTemplate.authorities, { nonNullable: true }),
securityGroup: new FormControl(userTemplate.securityGroup, { nonNullable: true }),
allowSamlAuthentication: new FormControl(userTemplate.allowSamlAuthentication, { nonNullable: true }),
allowUserPwdAuthentication: new FormControl(userTemplate.allowUserPwdAuthentication, { nonNullable: true }),
});
private userService = inject(UserManagementService);

View file

@ -14,6 +14,8 @@ export interface IUser {
lastModifiedBy?: string;
lastModifiedDate?: Date;
securityGroup?: ISecurityGroup;
allowUserPwdAuthentication?: boolean;
allowSamlAuthentication?: boolean;
}
export class User implements IUser {