feat: add getUserAssingableRoles method to identity.service

#4291
pull/4371/head
mehmet-erim 5 years ago
parent 68ef8587c5
commit 12f9d45c08

@ -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)]],

@ -103,6 +103,15 @@ export class IdentityService {
return this.rest.request<null, Identity.RoleResponse>(request, { apiName: this.apiName });
}
getUserAssingableRoles(): Observable<Identity.RoleResponse> {
const request: Rest.Request<null> = {
method: 'GET',
url: '/api/identity/users/assignable-roles',
};
return this.rest.request<null, Identity.RoleResponse>(request, { apiName: this.apiName });
}
deleteUser(id: string): Observable<null> {
const request: Rest.Request<null> = {
method: 'DELETE',

Loading…
Cancel
Save