fix(console): use authService for auth user page (#5233)

* auth grant

* fix: add missing attributes to ListMyUserGrantsResponse

* user grants typing

* typing

* auth grant link

* disable without role

* edit with auth grant

* chore(console): auto organize imports (#5293)

fix(console): auto organize imports

* Update console/src/app/modules/user-grants/user-grants-datasource.ts

Co-authored-by: Elio Bischof <[email protected]>

* Update console/src/app/modules/user-grants/user-grants-datasource.ts

Co-authored-by: Elio Bischof <[email protected]>

* Update console/src/app/modules/user-grants/user-grants-datasource.ts

Co-authored-by: Elio Bischof <[email protected]>

* linter, rm unused import

* add examples again

* lint

---------

Co-authored-by: Livio Spring <[email protected]>
Co-authored-by: Elio Bischof <[email protected]>
This commit is contained in:
Max Peintner
2023-02-27 12:03:44 +01:00
committed by GitHub
co-authored by Elio Bischof Livio Spring
parent c4ca72fe68
commit 9396e8b2f5
32 changed files with 117 additions and 118 deletions
@@ -9,10 +9,8 @@ import {
finalize,
map,
mergeMap,
pairwise,
switchMap,
take,
tap,
timeout,
withLatestFrom,
} from 'rxjs/operators';
@@ -29,7 +27,6 @@ import {
GetMyEmailRequest,
GetMyEmailResponse,
GetMyLabelPolicyRequest,
GetMyLabelPolicyResponse,
GetMyLoginPolicyRequest,
GetMyLoginPolicyResponse,
GetMyPasswordComplexityPolicyRequest,
@@ -426,11 +423,7 @@ export class GrpcAuthService {
return this.grpcService.auth.listMyUserSessions(req, null).then((resp) => resp.toObject());
}
public listMyUserGrants(
limit?: number,
offset?: number,
queryList?: ListQuery[],
): Promise<ListMyUserGrantsResponse.AsObject> {
public listMyUserGrants(limit?: number, offset?: number, asc?: boolean): Promise<ListMyUserGrantsResponse.AsObject> {
const req = new ListMyUserGrantsRequest();
const query = new ListQuery();
if (limit) {
@@ -439,6 +432,9 @@ export class GrpcAuthService {
if (offset) {
query.setOffset(offset);
}
if (asc !== undefined) {
query.setAsc(asc);
}
req.setQuery(query);
return this.grpcService.auth.listMyUserGrants(req, null).then((resp) => resp.toObject());
}