1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 22:03:36 +00:00

[EC-338] Update SCIM code naming conventions (revoked/restore) (#3160)

This commit is contained in:
Thomas Rittson
2022-07-25 10:47:56 +10:00
committed by GitHub
parent 8694227b92
commit 0f44789d0f
15 changed files with 87 additions and 95 deletions

View File

@@ -55,9 +55,9 @@ export abstract class BasePeopleComponent<
: 0; : 0;
} }
get deactivatedCount() { get revokedCount() {
return this.statusMap.has(this.userStatusType.Deactivated) return this.statusMap.has(this.userStatusType.Revoked)
? this.statusMap.get(this.userStatusType.Deactivated).length ? this.statusMap.get(this.userStatusType.Revoked).length
: 0; : 0;
} }
@@ -112,8 +112,8 @@ export abstract class BasePeopleComponent<
abstract edit(user: UserType): void; abstract edit(user: UserType): void;
abstract getUsers(): Promise<ListResponse<UserType>>; abstract getUsers(): Promise<ListResponse<UserType>>;
abstract deleteUser(id: string): Promise<any>; abstract deleteUser(id: string): Promise<any>;
abstract deactivateUser(id: string): Promise<any>; abstract revokeUser(id: string): Promise<any>;
abstract activateUser(id: string): Promise<any>; abstract restoreUser(id: string): Promise<any>;
abstract reinviteUser(id: string): Promise<any>; abstract reinviteUser(id: string): Promise<any>;
abstract confirmUser(user: UserType, publicKey: Uint8Array): Promise<any>; abstract confirmUser(user: UserType, publicKey: Uint8Array): Promise<any>;
@@ -133,7 +133,7 @@ export abstract class BasePeopleComponent<
} else { } else {
this.statusMap.get(u.status).push(u); this.statusMap.get(u.status).push(u);
} }
if (u.status !== this.userStatusType.Deactivated) { if (u.status !== this.userStatusType.Revoked) {
this.activeUsers.push(u); this.activeUsers.push(u);
} }
}); });
@@ -235,9 +235,9 @@ export abstract class BasePeopleComponent<
this.actionPromise = null; this.actionPromise = null;
} }
async deactivate(user: UserType) { async revoke(user: UserType) {
const confirmed = await this.platformUtilsService.showDialog( const confirmed = await this.platformUtilsService.showDialog(
this.deactivateWarningMessage(), this.revokeWarningMessage(),
this.i18nService.t("revokeUserId", this.userNamePipe.transform(user)), this.i18nService.t("revokeUserId", this.userNamePipe.transform(user)),
this.i18nService.t("revokeAccess"), this.i18nService.t("revokeAccess"),
this.i18nService.t("cancel"), this.i18nService.t("cancel"),
@@ -248,7 +248,7 @@ export abstract class BasePeopleComponent<
return false; return false;
} }
this.actionPromise = this.deactivateUser(user.id); this.actionPromise = this.revokeUser(user.id);
try { try {
await this.actionPromise; await this.actionPromise;
this.platformUtilsService.showToast( this.platformUtilsService.showToast(
@@ -263,8 +263,8 @@ export abstract class BasePeopleComponent<
this.actionPromise = null; this.actionPromise = null;
} }
async activate(user: UserType) { async restore(user: UserType) {
this.actionPromise = this.activateUser(user.id); this.actionPromise = this.restoreUser(user.id);
try { try {
await this.actionPromise; await this.actionPromise;
this.platformUtilsService.showToast( this.platformUtilsService.showToast(
@@ -381,18 +381,10 @@ export abstract class BasePeopleComponent<
return !searching && this.users && this.users.length > this.pageSize; return !searching && this.users && this.users.length > this.pageSize;
} }
protected deleteWarningMessage(user: UserType): string { protected revokeWarningMessage(): string {
return this.i18nService.t("removeUserConfirmation");
}
protected deactivateWarningMessage(): string {
return this.i18nService.t("revokeUserConfirmation"); return this.i18nService.t("revokeUserConfirmation");
} }
protected activateWarningMessage(): string {
return this.i18nService.t("activateUserConfirmation");
}
protected getCheckedUsers() { protected getCheckedUsers() {
return this.users.filter((u) => (u as any).checked); return this.users.filter((u) => (u as any).checked);
} }

View File

@@ -29,8 +29,8 @@ import { NavbarComponent } from "../layouts/navbar.component";
import { UserLayoutComponent } from "../layouts/user-layout.component"; import { UserLayoutComponent } from "../layouts/user-layout.component";
import { OrganizationLayoutComponent } from "../organizations/layouts/organization-layout.component"; import { OrganizationLayoutComponent } from "../organizations/layouts/organization-layout.component";
import { BulkConfirmComponent as OrgBulkConfirmComponent } from "../organizations/manage/bulk/bulk-confirm.component"; import { BulkConfirmComponent as OrgBulkConfirmComponent } from "../organizations/manage/bulk/bulk-confirm.component";
import { BulkDeactivateComponent as OrgBulkDeactivateomponent } from "../organizations/manage/bulk/bulk-deactivate.component";
import { BulkRemoveComponent as OrgBulkRemoveComponent } from "../organizations/manage/bulk/bulk-remove.component"; import { BulkRemoveComponent as OrgBulkRemoveComponent } from "../organizations/manage/bulk/bulk-remove.component";
import { BulkRestoreRevokeComponent as OrgBulkRestoreRevokeComponent } from "../organizations/manage/bulk/bulk-restore-revoke.component";
import { BulkStatusComponent as OrgBulkStatusComponent } from "../organizations/manage/bulk/bulk-status.component"; import { BulkStatusComponent as OrgBulkStatusComponent } from "../organizations/manage/bulk/bulk-status.component";
import { CollectionAddEditComponent as OrgCollectionAddEditComponent } from "../organizations/manage/collection-add-edit.component"; import { CollectionAddEditComponent as OrgCollectionAddEditComponent } from "../organizations/manage/collection-add-edit.component";
import { CollectionsComponent as OrgManageCollectionsComponent } from "../organizations/manage/collections.component"; import { CollectionsComponent as OrgManageCollectionsComponent } from "../organizations/manage/collections.component";
@@ -237,7 +237,7 @@ import { OrganizationBadgeModule } from "./vault/modules/organization-badge/orga
OrganizationSubscriptionComponent, OrganizationSubscriptionComponent,
OrgAttachmentsComponent, OrgAttachmentsComponent,
OrgBulkConfirmComponent, OrgBulkConfirmComponent,
OrgBulkDeactivateomponent, OrgBulkRestoreRevokeComponent,
OrgBulkRemoveComponent, OrgBulkRemoveComponent,
OrgBulkStatusComponent, OrgBulkStatusComponent,
OrgCiphersComponent, OrgCiphersComponent,
@@ -390,7 +390,7 @@ import { OrganizationBadgeModule } from "./vault/modules/organization-badge/orga
OrganizationSubscriptionComponent, OrganizationSubscriptionComponent,
OrgAttachmentsComponent, OrgAttachmentsComponent,
OrgBulkConfirmComponent, OrgBulkConfirmComponent,
OrgBulkDeactivateomponent, OrgBulkRestoreRevokeComponent,
OrgBulkRemoveComponent, OrgBulkRemoveComponent,
OrgBulkStatusComponent, OrgBulkStatusComponent,
OrgCiphersComponent, OrgCiphersComponent,

View File

@@ -22,7 +22,7 @@
{{ error }} {{ error }}
</app-callout> </app-callout>
<ng-container *ngIf="!done"> <ng-container *ngIf="!done">
<app-callout type="warning" *ngIf="users.length > 0 && !error && isDeactivating"> <app-callout type="warning" *ngIf="users.length > 0 && !error && isRevoking">
{{ "revokeUsersWarning" | i18n }} {{ "revokeUsersWarning" | i18n }}
</app-callout> </app-callout>
<table class="table table-hover table-list"> <table class="table table-hover table-list">

View File

@@ -8,11 +8,11 @@ import { OrganizationUserBulkRequest } from "@bitwarden/common/models/request/or
import { BulkUserDetails } from "./bulk-status.component"; import { BulkUserDetails } from "./bulk-status.component";
@Component({ @Component({
selector: "app-bulk-deactivate", selector: "app-bulk-restore-revoke",
templateUrl: "bulk-deactivate.component.html", templateUrl: "bulk-restore-revoke.component.html",
}) })
export class BulkDeactivateComponent { export class BulkRestoreRevokeComponent {
isDeactivating: boolean; isRevoking: boolean;
organizationId: string; organizationId: string;
users: BulkUserDetails[]; users: BulkUserDetails[];
@@ -27,13 +27,13 @@ export class BulkDeactivateComponent {
protected i18nService: I18nService, protected i18nService: I18nService,
config: ModalConfig config: ModalConfig
) { ) {
this.isDeactivating = config.data.isDeactivating; this.isRevoking = config.data.isRevoking;
this.organizationId = config.data.organizationId; this.organizationId = config.data.organizationId;
this.users = config.data.users; this.users = config.data.users;
} }
get bulkTitle() { get bulkTitle() {
const titleKey = this.isDeactivating ? "revokeUsers" : "restoreUsers"; const titleKey = this.isRevoking ? "revokeUsers" : "restoreUsers";
return this.i18nService.t(titleKey); return this.i18nService.t(titleKey);
} }
@@ -42,7 +42,7 @@ export class BulkDeactivateComponent {
try { try {
const response = await this.performBulkUserAction(); const response = await this.performBulkUserAction();
const bulkMessage = this.isDeactivating ? "bulkRevokedMessage" : "bulkRestoredMessage"; const bulkMessage = this.isRevoking ? "bulkRevokedMessage" : "bulkRestoredMessage";
response.data.forEach((entry) => { response.data.forEach((entry) => {
const error = entry.error !== "" ? entry.error : this.i18nService.t(bulkMessage); const error = entry.error !== "" ? entry.error : this.i18nService.t(bulkMessage);
this.statuses.set(entry.id, error); this.statuses.set(entry.id, error);
@@ -57,10 +57,10 @@ export class BulkDeactivateComponent {
protected async performBulkUserAction() { protected async performBulkUserAction() {
const request = new OrganizationUserBulkRequest(this.users.map((user) => user.id)); const request = new OrganizationUserBulkRequest(this.users.map((user) => user.id));
if (this.isDeactivating) { if (this.isRevoking) {
return await this.apiService.deactivateManyOrganizationUsers(this.organizationId, request); return await this.apiService.revokeManyOrganizationUsers(this.organizationId, request);
} else { } else {
return await this.apiService.activateManyOrganizationUsers(this.organizationId, request); return await this.apiService.restoreManyOrganizationUsers(this.organizationId, request);
} }
} }
} }

View File

@@ -32,11 +32,11 @@
<button <button
type="button" type="button"
class="btn btn-outline-secondary" class="btn btn-outline-secondary"
[ngClass]="{ active: status == userStatusType.Deactivated }" [ngClass]="{ active: status == userStatusType.Revoked }"
(click)="filter(userStatusType.Deactivated)" (click)="filter(userStatusType.Revoked)"
> >
{{ "revoked" | i18n }} {{ "revoked" | i18n }}
<span bitBadge badgeType="info" *ngIf="deactivatedCount">{{ deactivatedCount }}</span> <span bitBadge badgeType="info" *ngIf="revokedCount">{{ revokedCount }}</span>
</button> </button>
</div> </div>
<div class="ml-3"> <div class="ml-3">
@@ -75,11 +75,11 @@
<i class="bwi bwi-fw bwi-check" aria-hidden="true"></i> <i class="bwi bwi-fw bwi-check" aria-hidden="true"></i>
{{ "confirmSelected" | i18n }} {{ "confirmSelected" | i18n }}
</button> </button>
<button class="dropdown-item" appStopClick (click)="bulkActivate()"> <button class="dropdown-item" appStopClick (click)="bulkRestore()">
<i class="bwi bwi-fw bwi-plus-circle" aria-hidden="true"></i> <i class="bwi bwi-fw bwi-plus-circle" aria-hidden="true"></i>
{{ "restoreAccess" | i18n }} {{ "restoreAccess" | i18n }}
</button> </button>
<button class="dropdown-item" appStopClick (click)="bulkDeactivate()"> <button class="dropdown-item" appStopClick (click)="bulkRevoke()">
<i class="bwi bwi-fw bwi-minus-circle" aria-hidden="true"></i> <i class="bwi bwi-fw bwi-minus-circle" aria-hidden="true"></i>
{{ "revokeAccess" | i18n }} {{ "revokeAccess" | i18n }}
</button> </button>
@@ -158,7 +158,7 @@
<span bitBadge badgeType="warning" *ngIf="u.status === userStatusType.Accepted">{{ <span bitBadge badgeType="warning" *ngIf="u.status === userStatusType.Accepted">{{
"accepted" | i18n "accepted" | i18n
}}</span> }}</span>
<span bitBadge badgeType="secondary" *ngIf="u.status === userStatusType.Deactivated">{{ <span bitBadge badgeType="secondary" *ngIf="u.status === userStatusType.Revoked">{{
"revoked" | i18n "revoked" | i18n
}}</span> }}</span>
<small class="text-muted d-block" *ngIf="u.name">{{ u.name }}</small> <small class="text-muted d-block" *ngIf="u.name">{{ u.name }}</small>
@@ -255,8 +255,8 @@
class="dropdown-item" class="dropdown-item"
href="#" href="#"
appStopClick appStopClick
(click)="activate(u)" (click)="restore(u)"
*ngIf="u.status === userStatusType.Deactivated" *ngIf="u.status === userStatusType.Revoked"
> >
<i class="bwi bwi-fw bwi-plus-circle" aria-hidden="true"></i> <i class="bwi bwi-fw bwi-plus-circle" aria-hidden="true"></i>
{{ "restoreAccess" | i18n }} {{ "restoreAccess" | i18n }}
@@ -265,8 +265,8 @@
class="dropdown-item" class="dropdown-item"
href="#" href="#"
appStopClick appStopClick
(click)="deactivate(u)" (click)="revoke(u)"
*ngIf="u.status !== userStatusType.Deactivated" *ngIf="u.status !== userStatusType.Revoked"
> >
<i class="bwi bwi-fw bwi-minus-circle" aria-hidden="true"></i> <i class="bwi bwi-fw bwi-minus-circle" aria-hidden="true"></i>
{{ "revokeAccess" | i18n }} {{ "revokeAccess" | i18n }}

View File

@@ -29,8 +29,8 @@ import { OrganizationUserUserDetailsResponse } from "@bitwarden/common/models/re
import { BasePeopleComponent } from "../../common/base.people.component"; import { BasePeopleComponent } from "../../common/base.people.component";
import { BulkConfirmComponent } from "./bulk/bulk-confirm.component"; import { BulkConfirmComponent } from "./bulk/bulk-confirm.component";
import { BulkDeactivateComponent } from "./bulk/bulk-deactivate.component";
import { BulkRemoveComponent } from "./bulk/bulk-remove.component"; import { BulkRemoveComponent } from "./bulk/bulk-remove.component";
import { BulkRestoreRevokeComponent } from "./bulk/bulk-restore-revoke.component";
import { BulkStatusComponent } from "./bulk/bulk-status.component"; import { BulkStatusComponent } from "./bulk/bulk-status.component";
import { EntityEventsComponent } from "./entity-events.component"; import { EntityEventsComponent } from "./entity-events.component";
import { ResetPasswordComponent } from "./reset-password.component"; import { ResetPasswordComponent } from "./reset-password.component";
@@ -167,12 +167,12 @@ export class PeopleComponent
return this.apiService.deleteOrganizationUser(this.organizationId, id); return this.apiService.deleteOrganizationUser(this.organizationId, id);
} }
deactivateUser(id: string): Promise<any> { revokeUser(id: string): Promise<any> {
return this.apiService.deactivateOrganizationUser(this.organizationId, id); return this.apiService.revokeOrganizationUser(this.organizationId, id);
} }
activateUser(id: string): Promise<any> { restoreUser(id: string): Promise<any> {
return this.apiService.activateOrganizationUser(this.organizationId, id); return this.apiService.restoreOrganizationUser(this.organizationId, id);
} }
reinviteUser(id: string): Promise<any> { reinviteUser(id: string): Promise<any> {
@@ -245,11 +245,11 @@ export class PeopleComponent
modal.close(); modal.close();
this.removeUser(user); this.removeUser(user);
}); });
comp.onDeactivatedUser.subscribe(() => { comp.onRevokedUser.subscribe(() => {
modal.close(); modal.close();
this.load(); this.load();
}); });
comp.onActivatedUser.subscribe(() => { comp.onRestoredUser.subscribe(() => {
modal.close(); modal.close();
this.load(); this.load();
}); });
@@ -290,25 +290,25 @@ export class PeopleComponent
await this.load(); await this.load();
} }
async bulkDeactivate() { async bulkRevoke() {
await this.bulkActivateOrDeactivate(true); await this.bulkRevokeOrRestore(true);
} }
async bulkActivate() { async bulkRestore() {
await this.bulkActivateOrDeactivate(false); await this.bulkRevokeOrRestore(false);
} }
async bulkActivateOrDeactivate(isDeactivating: boolean) { async bulkRevokeOrRestore(isRevoking: boolean) {
if (this.actionPromise != null) { if (this.actionPromise != null) {
return; return;
} }
const ref = this.modalService.open(BulkDeactivateComponent, { const ref = this.modalService.open(BulkRestoreRevokeComponent, {
allowMultipleModals: true, allowMultipleModals: true,
data: { data: {
organizationId: this.organizationId, organizationId: this.organizationId,
users: this.getCheckedUsers(), users: this.getCheckedUsers(),
isDeactivating: isDeactivating, isRevoking: isRevoking,
}, },
}); });

View File

@@ -11,7 +11,7 @@
<h2 class="modal-title" id="userAddEditTitle"> <h2 class="modal-title" id="userAddEditTitle">
{{ title }} {{ title }}
<small class="text-muted" *ngIf="name">{{ name }}</small> <small class="text-muted" *ngIf="name">{{ name }}</small>
<span bitBadge badgeType="secondary" *ngIf="isDeactivated">{{ "revoked" | i18n }}</span> <span bitBadge badgeType="secondary" *ngIf="isRevoked">{{ "revoked" | i18n }}</span>
</h2> </h2>
<button <button
type="button" type="button"
@@ -381,9 +381,9 @@
<div class="ml-auto"> <div class="ml-auto">
<button <button
type="button" type="button"
(click)="activate()" (click)="restore()"
class="btn btn-outline-secondary" class="btn btn-outline-secondary"
*ngIf="editMode && isDeactivated" *ngIf="editMode && isRevoked"
[disabled]="form.loading" [disabled]="form.loading"
> >
<i <i
@@ -396,9 +396,9 @@
</button> </button>
<button <button
type="button" type="button"
(click)="deactivate()" (click)="revoke()"
class="btn btn-outline-secondary" class="btn btn-outline-secondary"
*ngIf="editMode && !isDeactivated" *ngIf="editMode && !isRevoked"
[disabled]="form.loading" [disabled]="form.loading"
> >
<i <i

View File

@@ -27,12 +27,12 @@ export class UserAddEditComponent implements OnInit {
@Input() usesKeyConnector = false; @Input() usesKeyConnector = false;
@Output() onSavedUser = new EventEmitter(); @Output() onSavedUser = new EventEmitter();
@Output() onDeletedUser = new EventEmitter(); @Output() onDeletedUser = new EventEmitter();
@Output() onDeactivatedUser = new EventEmitter(); @Output() onRevokedUser = new EventEmitter();
@Output() onActivatedUser = new EventEmitter(); @Output() onRestoredUser = new EventEmitter();
loading = true; loading = true;
editMode = false; editMode = false;
isDeactivated = false; isRevoked = false;
title: string; title: string;
emails: string; emails: string;
type: OrganizationUserType = OrganizationUserType.User; type: OrganizationUserType = OrganizationUserType.User;
@@ -101,7 +101,7 @@ export class UserAddEditComponent implements OnInit {
); );
this.access = user.accessAll ? "all" : "selected"; this.access = user.accessAll ? "all" : "selected";
this.type = user.type; this.type = user.type;
this.isDeactivated = user.status === OrganizationUserStatusType.Deactivated; this.isRevoked = user.status === OrganizationUserStatusType.Revoked;
if (user.type === OrganizationUserType.Custom) { if (user.type === OrganizationUserType.Custom) {
this.permissions = user.permissions; this.permissions = user.permissions;
} }
@@ -245,7 +245,7 @@ export class UserAddEditComponent implements OnInit {
} }
} }
async deactivate() { async revoke() {
if (!this.editMode) { if (!this.editMode) {
return; return;
} }
@@ -262,7 +262,7 @@ export class UserAddEditComponent implements OnInit {
} }
try { try {
this.formPromise = this.apiService.deactivateOrganizationUser( this.formPromise = this.apiService.revokeOrganizationUser(
this.organizationId, this.organizationId,
this.organizationUserId this.organizationUserId
); );
@@ -272,20 +272,20 @@ export class UserAddEditComponent implements OnInit {
null, null,
this.i18nService.t("revokedUserId", this.name) this.i18nService.t("revokedUserId", this.name)
); );
this.isDeactivated = true; this.isRevoked = true;
this.onDeactivatedUser.emit(); this.onRevokedUser.emit();
} catch (e) { } catch (e) {
this.logService.error(e); this.logService.error(e);
} }
} }
async activate() { async restore() {
if (!this.editMode) { if (!this.editMode) {
return; return;
} }
try { try {
this.formPromise = this.apiService.activateOrganizationUser( this.formPromise = this.apiService.restoreOrganizationUser(
this.organizationId, this.organizationId,
this.organizationUserId this.organizationUserId
); );
@@ -295,8 +295,8 @@ export class UserAddEditComponent implements OnInit {
null, null,
this.i18nService.t("restoredUserId", this.name) this.i18nService.t("restoredUserId", this.name)
); );
this.isDeactivated = false; this.isRevoked = false;
this.onActivatedUser.emit(); this.onRestoredUser.emit();
} catch (e) { } catch (e) {
this.logService.error(e); this.logService.error(e);
} }

View File

@@ -280,14 +280,14 @@ export class EventService {
this.getShortId(ev.organizationUserId) this.getShortId(ev.organizationUserId)
); );
break; break;
case EventType.OrganizationUser_Deactivated: case EventType.OrganizationUser_Revoked:
msg = this.i18nService.t("revokedUserId", this.formatOrgUserId(ev)); msg = this.i18nService.t("revokedUserId", this.formatOrgUserId(ev));
humanReadableMsg = this.i18nService.t( humanReadableMsg = this.i18nService.t(
"revokedUserId", "revokedUserId",
this.getShortId(ev.organizationUserId) this.getShortId(ev.organizationUserId)
); );
break; break;
case EventType.OrganizationUser_Activated: case EventType.OrganizationUser_Restored:
msg = this.i18nService.t("restoredUserId", this.formatOrgUserId(ev)); msg = this.i18nService.t("restoredUserId", this.formatOrgUserId(ev));
humanReadableMsg = this.i18nService.t( humanReadableMsg = this.i18nService.t(
"restoredUserId", "restoredUserId",

View File

@@ -120,12 +120,12 @@ export class PeopleComponent
return this.apiService.deleteProviderUser(this.providerId, id); return this.apiService.deleteProviderUser(this.providerId, id);
} }
deactivateUser(id: string): Promise<any> { revokeUser(id: string): Promise<any> {
// Not implemented. // Not implemented.
return null; return null;
} }
activateUser(id: string): Promise<any> { restoreUser(id: string): Promise<any> {
// Not implemented. // Not implemented.
return null; return null;
} }

View File

@@ -449,13 +449,13 @@ export abstract class ApiService {
organizationId: string, organizationId: string,
request: OrganizationUserBulkRequest request: OrganizationUserBulkRequest
) => Promise<ListResponse<OrganizationUserBulkResponse>>; ) => Promise<ListResponse<OrganizationUserBulkResponse>>;
deactivateOrganizationUser: (organizationId: string, id: string) => Promise<any>; revokeOrganizationUser: (organizationId: string, id: string) => Promise<any>;
deactivateManyOrganizationUsers: ( revokeManyOrganizationUsers: (
organizationId: string, organizationId: string,
request: OrganizationUserBulkRequest request: OrganizationUserBulkRequest
) => Promise<ListResponse<OrganizationUserBulkResponse>>; ) => Promise<ListResponse<OrganizationUserBulkResponse>>;
activateOrganizationUser: (organizationId: string, id: string) => Promise<any>; restoreOrganizationUser: (organizationId: string, id: string) => Promise<any>;
activateManyOrganizationUsers: ( restoreManyOrganizationUsers: (
organizationId: string, organizationId: string,
request: OrganizationUserBulkRequest request: OrganizationUserBulkRequest
) => Promise<ListResponse<OrganizationUserBulkResponse>>; ) => Promise<ListResponse<OrganizationUserBulkResponse>>;

View File

@@ -48,8 +48,8 @@ export enum EventType {
OrganizationUser_AdminResetPassword = 1508, OrganizationUser_AdminResetPassword = 1508,
OrganizationUser_ResetSsoLink = 1509, OrganizationUser_ResetSsoLink = 1509,
OrganizationUser_FirstSsoLogin = 1510, OrganizationUser_FirstSsoLogin = 1510,
OrganizationUser_Deactivated = 1511, OrganizationUser_Revoked = 1511,
OrganizationUser_Activated = 1512, OrganizationUser_Restored = 1512,
Organization_Updated = 1600, Organization_Updated = 1600,
Organization_PurgedVault = 1601, Organization_PurgedVault = 1601,

View File

@@ -2,5 +2,5 @@ export enum OrganizationUserStatusType {
Invited = 0, Invited = 0,
Accepted = 1, Accepted = 1,
Confirmed = 2, Confirmed = 2,
Deactivated = -1, Revoked = -1,
} }

View File

@@ -2,5 +2,5 @@ export enum ProviderUserStatusType {
Invited = 0, Invited = 0,
Accepted = 1, Accepted = 1,
Confirmed = 2, Confirmed = 2,
Deactivated = -1, // Not used, compile-time support only Revoked = -1, // Not used, compile-time support only
} }

View File

@@ -1344,23 +1344,23 @@ export class ApiService implements ApiServiceAbstraction {
return new ListResponse(r, OrganizationUserBulkResponse); return new ListResponse(r, OrganizationUserBulkResponse);
} }
deactivateOrganizationUser(organizationId: string, id: string): Promise<any> { revokeOrganizationUser(organizationId: string, id: string): Promise<any> {
return this.send( return this.send(
"PUT", "PUT",
"/organizations/" + organizationId + "/users/" + id + "/deactivate", "/organizations/" + organizationId + "/users/" + id + "/revoke",
null, null,
true, true,
false false
); );
} }
async deactivateManyOrganizationUsers( async revokeManyOrganizationUsers(
organizationId: string, organizationId: string,
request: OrganizationUserBulkRequest request: OrganizationUserBulkRequest
): Promise<ListResponse<OrganizationUserBulkResponse>> { ): Promise<ListResponse<OrganizationUserBulkResponse>> {
const r = await this.send( const r = await this.send(
"PUT", "PUT",
"/organizations/" + organizationId + "/users/deactivate", "/organizations/" + organizationId + "/users/revoke",
request, request,
true, true,
true true
@@ -1368,23 +1368,23 @@ export class ApiService implements ApiServiceAbstraction {
return new ListResponse(r, OrganizationUserBulkResponse); return new ListResponse(r, OrganizationUserBulkResponse);
} }
activateOrganizationUser(organizationId: string, id: string): Promise<any> { restoreOrganizationUser(organizationId: string, id: string): Promise<any> {
return this.send( return this.send(
"PUT", "PUT",
"/organizations/" + organizationId + "/users/" + id + "/activate", "/organizations/" + organizationId + "/users/" + id + "/restore",
null, null,
true, true,
false false
); );
} }
async activateManyOrganizationUsers( async restoreManyOrganizationUsers(
organizationId: string, organizationId: string,
request: OrganizationUserBulkRequest request: OrganizationUserBulkRequest
): Promise<ListResponse<OrganizationUserBulkResponse>> { ): Promise<ListResponse<OrganizationUserBulkResponse>> {
const r = await this.send( const r = await this.send(
"PUT", "PUT",
"/organizations/" + organizationId + "/users/activate", "/organizations/" + organizationId + "/users/restore",
request, request,
true, true,
true true