mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-09 15:45:12 +00:00
feat(console): add and remove org domains, show userLoginNames (#235)
* org domains, user login names * switch user to userview, regen proto
This commit is contained in:
@@ -34,6 +34,7 @@ import {
|
||||
UserSearchQuery,
|
||||
UserSearchRequest,
|
||||
UserSearchResponse,
|
||||
UserView,
|
||||
} from '../proto/generated/management_pb';
|
||||
import { GrpcBackendService } from './grpc-backend.service';
|
||||
import { GrpcService, RequestFactory, ResponseMapper } from './grpc.service';
|
||||
@@ -82,7 +83,7 @@ export class MgmtUserService {
|
||||
);
|
||||
}
|
||||
|
||||
public async GetUserByID(id: string): Promise<User> {
|
||||
public async GetUserByID(id: string): Promise<UserView> {
|
||||
const req = new UserID();
|
||||
req.setId(id);
|
||||
return await this.request(
|
||||
|
||||
@@ -4,6 +4,7 @@ import { Metadata } from 'grpc-web';
|
||||
|
||||
import { ManagementServicePromiseClient } from '../proto/generated/management_grpc_web_pb';
|
||||
import {
|
||||
AddOrgDomainRequest,
|
||||
AddOrgMemberRequest,
|
||||
Iam,
|
||||
Org,
|
||||
@@ -29,6 +30,7 @@ import {
|
||||
PasswordLockoutPolicyUpdate,
|
||||
ProjectGrant,
|
||||
ProjectGrantCreate,
|
||||
RemoveOrgDomainRequest,
|
||||
RemoveOrgMemberRequest,
|
||||
} from '../proto/generated/management_pb';
|
||||
import { GrpcBackendService } from './grpc-backend.service';
|
||||
@@ -74,6 +76,26 @@ export class OrgService {
|
||||
);
|
||||
}
|
||||
|
||||
public async AddMyOrgDomain(domain: string): Promise<OrgDomain> {
|
||||
const req: AddOrgDomainRequest = new AddOrgDomainRequest();
|
||||
req.setDomain(domain);
|
||||
return await this.request(
|
||||
c => c.addMyOrgDomain,
|
||||
req,
|
||||
f => f,
|
||||
);
|
||||
}
|
||||
|
||||
public async RemoveMyOrgDomain(domain: string): Promise<Empty> {
|
||||
const req: RemoveOrgDomainRequest = new RemoveOrgDomainRequest();
|
||||
req.setDomain(domain);
|
||||
return await this.request(
|
||||
c => c.removeMyOrgDomain,
|
||||
req,
|
||||
f => f,
|
||||
);
|
||||
}
|
||||
|
||||
public async SearchMyOrgDomains(offset: number, limit: number, queryList?: OrgDomainSearchQuery[]):
|
||||
Promise<OrgDomainSearchResponse> {
|
||||
const req: OrgDomainSearchRequest = new OrgDomainSearchRequest();
|
||||
|
||||
Reference in New Issue
Block a user