mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-04 05:12:16 +00:00
feat(console): user metadata, rehaul detail pages (#2209)
* service, sidenav, i18n, dialog * detail layout, user detail * metadata dialog from * dialog * features * formarray * metadata component * comp * user metadata refresh * use formarray, control, bulk save * metadata revert, has feature directive * lint * lint * typo * info row user, warn color optim * card cleanup, actions for user detail * project, org, user, app rehaul * lint * scss * digit fix * features and project grid rehaul * info-section layout, org domain info * readd palette scss * add svg email warn * missing translation * rm unused ts * lockoutpolicy * check for lockout feature
This commit is contained in:
@@ -64,6 +64,8 @@ import {
|
||||
BulkAddProjectRolesResponse,
|
||||
BulkRemoveUserGrantRequest,
|
||||
BulkRemoveUserGrantResponse,
|
||||
BulkSetUserMetadataRequest,
|
||||
BulkSetUserMetadataResponse,
|
||||
DeactivateAppRequest,
|
||||
DeactivateAppResponse,
|
||||
DeactivateOrgIDPRequest,
|
||||
@@ -160,6 +162,8 @@ import {
|
||||
GetUserByLoginNameGlobalResponse,
|
||||
GetUserGrantByIDRequest,
|
||||
GetUserGrantByIDResponse,
|
||||
GetUserMetadataRequest,
|
||||
GetUserMetadataResponse,
|
||||
IDPQuery,
|
||||
ListAppChangesRequest,
|
||||
ListAppChangesResponse,
|
||||
@@ -214,6 +218,8 @@ import {
|
||||
ListUserGrantResponse,
|
||||
ListUserMembershipsRequest,
|
||||
ListUserMembershipsResponse,
|
||||
ListUserMetadataRequest,
|
||||
ListUserMetadataResponse,
|
||||
ListUsersRequest,
|
||||
ListUsersResponse,
|
||||
ReactivateAppRequest,
|
||||
@@ -282,6 +288,8 @@ import {
|
||||
RemoveSecondFactorFromLoginPolicyResponse,
|
||||
RemoveUserGrantRequest,
|
||||
RemoveUserGrantResponse,
|
||||
RemoveUserMetadataRequest,
|
||||
RemoveUserMetadataResponse,
|
||||
RemoveUserRequest,
|
||||
RemoveUserResponse,
|
||||
ResendHumanEmailVerificationRequest,
|
||||
@@ -334,6 +342,8 @@ import {
|
||||
SetHumanInitialPasswordRequest,
|
||||
SetPrimaryOrgDomainRequest,
|
||||
SetPrimaryOrgDomainResponse,
|
||||
SetUserMetadataRequest,
|
||||
SetUserMetadataResponse,
|
||||
UnlockUserRequest,
|
||||
UnlockUserResponse,
|
||||
UpdateAPIAppConfigRequest,
|
||||
@@ -384,6 +394,7 @@ import {
|
||||
ValidateOrgDomainResponse,
|
||||
} from '../proto/generated/zitadel/management_pb';
|
||||
import { SearchQuery } from '../proto/generated/zitadel/member_pb';
|
||||
import { MetadataQuery } from '../proto/generated/zitadel/metadata_pb';
|
||||
import { ListQuery } from '../proto/generated/zitadel/object_pb';
|
||||
import { DomainSearchQuery, DomainValidationType } from '../proto/generated/zitadel/org_pb';
|
||||
import { PasswordComplexityPolicy } from '../proto/generated/zitadel/policy_pb';
|
||||
@@ -1175,6 +1186,7 @@ export class ManagementService {
|
||||
): Promise<UpdateCustomLockoutPolicyResponse.AsObject> {
|
||||
const req = new UpdateCustomLockoutPolicyRequest();
|
||||
req.setMaxPasswordAttempts(maxAttempts);
|
||||
|
||||
return this.grpcService.mgmt.updateCustomLockoutPolicy(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
@@ -1196,6 +1208,54 @@ export class ManagementService {
|
||||
return this.grpcService.mgmt.getUserByID(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public listUserMetadata(userId: string, offset?: number, limit?: number, queryList?: MetadataQuery[]):
|
||||
Promise<ListUserMetadataResponse.AsObject> {
|
||||
const req = new ListUserMetadataRequest();
|
||||
|
||||
req.setId(userId);
|
||||
const metadata = new ListQuery();
|
||||
if (offset) {
|
||||
metadata.setOffset(offset);
|
||||
}
|
||||
if (limit) {
|
||||
metadata.setLimit(limit);
|
||||
}
|
||||
if (queryList) {
|
||||
req.setQueriesList(queryList);
|
||||
}
|
||||
return this.grpcService.mgmt.listUserMetadata(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public getUserMetadata(userId: string, key: string): Promise<GetUserMetadataResponse.AsObject> {
|
||||
const req = new GetUserMetadataRequest();
|
||||
req.setId(userId);
|
||||
req.setKey(key);
|
||||
return this.grpcService.mgmt.getUserMetadata(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public setUserMetadata(key: string, value: string, userId: string): Promise<SetUserMetadataResponse.AsObject> {
|
||||
const req = new SetUserMetadataRequest();
|
||||
req.setKey(key);
|
||||
req.setValue(value);
|
||||
req.setId(userId);
|
||||
return this.grpcService.mgmt.setUserMetadata(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public bulkSetUserMetadata(list: BulkSetUserMetadataRequest.Metadata[], userId: string):
|
||||
Promise<BulkSetUserMetadataResponse.AsObject> {
|
||||
const req = new BulkSetUserMetadataRequest();
|
||||
req.setMetadataList(list);
|
||||
req.setId(userId);
|
||||
return this.grpcService.mgmt.bulkSetUserMetadata(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public removeUserMetadata(key: string, userId: string): Promise<RemoveUserMetadataResponse.AsObject> {
|
||||
const req = new RemoveUserMetadataRequest();
|
||||
req.setKey(key);
|
||||
req.setId(userId);
|
||||
return this.grpcService.mgmt.removeUserMetadata(req, null).then(resp => resp.toObject());
|
||||
}
|
||||
|
||||
public removeUser(id: string): Promise<RemoveUserResponse.AsObject> {
|
||||
const req = new RemoveUserRequest();
|
||||
req.setId(id);
|
||||
|
||||
Reference in New Issue
Block a user