feat: add DCB User Service API - Authentication system with KEYCLOAK - Modular architecture with services for each feature
This commit is contained in:
parent
2584a17bcc
commit
87d72473ab
@ -323,9 +323,9 @@
|
||||
(change)="onRoleSelectionChange($any($event.target).value)"
|
||||
name="role"
|
||||
required
|
||||
[disabled]="creatingUser || !canManageRoles"
|
||||
[disabled]="creatingUser"
|
||||
>
|
||||
<option value="" disabled>Sélectionnez un rôle</option>
|
||||
<option value="" >Sélectionnez un rôle</option>
|
||||
@for (role of availableRoles; track role.value) {
|
||||
<option
|
||||
[value]="role.value"
|
||||
|
||||
@ -694,8 +694,8 @@ export class MerchantConfigView implements OnInit, OnDestroy {
|
||||
return [
|
||||
//{ value: UserRole.DCB_PARTNER, label: 'Partenaire' },
|
||||
{ value: UserRole.DCB_PARTNER_ADMIN, label: 'Admin Partenaire' },
|
||||
{ value: UserRole.DCB_ADMIN, label: 'Administrateur' },
|
||||
{ value: UserRole.DCB_SUPPORT, label: 'Support' }
|
||||
{ value: UserRole.DCB_PARTNER_MANAGER, label: 'Administrateur' },
|
||||
{ value: UserRole.DCB_PARTNER_SUPPORT, label: 'Support' }
|
||||
].filter(role =>
|
||||
// Filtrer selon les permissions de l'utilisateur courant
|
||||
this.canAssignRole(role.value)
|
||||
@ -741,7 +741,7 @@ export class MerchantConfigView implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
canManageAllMerchants(): boolean {
|
||||
const adminRoles = [UserRole.DCB_ADMIN, UserRole.DCB_SUPPORT, UserRole.DCB_PARTNER_ADMIN];
|
||||
const adminRoles = [UserRole.DCB_ADMIN, UserRole.DCB_SUPPORT];
|
||||
return this.currentUserRole ? adminRoles.includes(this.currentUserRole) : false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user