diff --git a/npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts b/npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts index aeeb250126..73da8ad38d 100644 --- a/npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts +++ b/npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts @@ -82,7 +82,7 @@ export class UsersComponent implements OnInit { } buildForm() { - this.identityService.getAllRoles().subscribe(({ items }) => { + this.identityService.getUserAssingableRoles().subscribe(({ items }) => { this.roles = items; this.form = this.fb.group({ userName: [this.selected.userName || '', [Validators.required, Validators.maxLength(256)]], diff --git a/npm/ng-packs/packages/identity/src/lib/services/identity.service.ts b/npm/ng-packs/packages/identity/src/lib/services/identity.service.ts index 51e88557fe..7413079279 100644 --- a/npm/ng-packs/packages/identity/src/lib/services/identity.service.ts +++ b/npm/ng-packs/packages/identity/src/lib/services/identity.service.ts @@ -103,6 +103,15 @@ export class IdentityService { return this.rest.request(request, { apiName: this.apiName }); } + getUserAssingableRoles(): Observable { + const request: Rest.Request = { + method: 'GET', + url: '/api/identity/users/assignable-roles', + }; + + return this.rest.request(request, { apiName: this.apiName }); + } + deleteUser(id: string): Observable { const request: Rest.Request = { method: 'DELETE',