feat(console): change default organization (#5151)

Adds the possibility to change the default organization from the organization overview
This commit is contained in:
Max Peintner
2023-02-14 09:31:32 +01:00
committed by GitHub
parent 6a97c3e233
commit 3696c1b2d9
12 changed files with 150 additions and 3 deletions
@@ -222,6 +222,8 @@ import {
GetCustomPasswordChangeMessageTextRequest,
AddNotificationPolicyRequest,
AddNotificationPolicyResponse,
SetDefaultOrgRequest,
SetDefaultOrgResponse,
} from '../proto/generated/zitadel/admin_pb';
import { SearchQuery } from '../proto/generated/zitadel/member_pb';
import { ListQuery } from '../proto/generated/zitadel/object_pb';
@@ -233,6 +235,13 @@ import { GrpcService } from './grpc.service';
export class AdminService {
constructor(private readonly grpcService: GrpcService) {}
public setDefaultOrg(orgId: string): Promise<SetDefaultOrgResponse.AsObject> {
const req = new SetDefaultOrgRequest();
req.setOrgId(orgId);
return this.grpcService.admin.setDefaultOrg(req, null).then((resp) => resp.toObject());
}
public listEvents(req: ListEventsRequest): Promise<ListEventsResponse> {
return this.grpcService.admin.listEvents(req, null).then((resp) => resp);
}