[EC-943] remove deprecated permissions (#4467)
* [EC-943] remove deprecated permissions * [EC-943] Remove permissions from OAVR changes
This commit is contained in:
parent
e7e5918a68
commit
c5e99b807e
|
@ -175,15 +175,20 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
this.isRevoked = userDetails.status === OrganizationUserStatusType.Revoked;
|
this.isRevoked = userDetails.status === OrganizationUserStatusType.Revoked;
|
||||||
const assignedCollectionsPermissions = {
|
const assignedCollectionsPermissions = {
|
||||||
manageAssignedCollections: userDetails.permissions.manageAssignedCollections,
|
|
||||||
editAssignedCollections: userDetails.permissions.editAssignedCollections,
|
editAssignedCollections: userDetails.permissions.editAssignedCollections,
|
||||||
deleteAssignedCollections: userDetails.permissions.deleteAssignedCollections,
|
deleteAssignedCollections: userDetails.permissions.deleteAssignedCollections,
|
||||||
|
manageAssignedCollections:
|
||||||
|
userDetails.permissions.editAssignedCollections &&
|
||||||
|
userDetails.permissions.deleteAssignedCollections,
|
||||||
};
|
};
|
||||||
const allCollectionsPermissions = {
|
const allCollectionsPermissions = {
|
||||||
manageAllCollections: userDetails.permissions.manageAllCollections,
|
|
||||||
createNewCollections: userDetails.permissions.createNewCollections,
|
createNewCollections: userDetails.permissions.createNewCollections,
|
||||||
editAnyCollection: userDetails.permissions.editAnyCollection,
|
editAnyCollection: userDetails.permissions.editAnyCollection,
|
||||||
deleteAnyCollection: userDetails.permissions.deleteAnyCollection,
|
deleteAnyCollection: userDetails.permissions.deleteAnyCollection,
|
||||||
|
manageAllCollections:
|
||||||
|
userDetails.permissions.createNewCollections &&
|
||||||
|
userDetails.permissions.editAnyCollection &&
|
||||||
|
userDetails.permissions.deleteAnyCollection,
|
||||||
};
|
};
|
||||||
if (userDetails.type === OrganizationUserType.Custom) {
|
if (userDetails.type === OrganizationUserType.Custom) {
|
||||||
this.permissionsGroup.patchValue({
|
this.permissionsGroup.patchValue({
|
||||||
|
@ -255,15 +260,11 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
|
||||||
managePolicies: this.permissionsGroup.value.managePolicies,
|
managePolicies: this.permissionsGroup.value.managePolicies,
|
||||||
manageUsers: this.permissionsGroup.value.manageUsers,
|
manageUsers: this.permissionsGroup.value.manageUsers,
|
||||||
manageResetPassword: this.permissionsGroup.value.manageResetPassword,
|
manageResetPassword: this.permissionsGroup.value.manageResetPassword,
|
||||||
manageAllCollections:
|
|
||||||
this.permissionsGroup.value.manageAllCollectionsGroup.manageAllCollections,
|
|
||||||
createNewCollections:
|
createNewCollections:
|
||||||
this.permissionsGroup.value.manageAllCollectionsGroup.createNewCollections,
|
this.permissionsGroup.value.manageAllCollectionsGroup.createNewCollections,
|
||||||
editAnyCollection: this.permissionsGroup.value.manageAllCollectionsGroup.editAnyCollection,
|
editAnyCollection: this.permissionsGroup.value.manageAllCollectionsGroup.editAnyCollection,
|
||||||
deleteAnyCollection:
|
deleteAnyCollection:
|
||||||
this.permissionsGroup.value.manageAllCollectionsGroup.deleteAnyCollection,
|
this.permissionsGroup.value.manageAllCollectionsGroup.deleteAnyCollection,
|
||||||
manageAssignedCollections:
|
|
||||||
this.permissionsGroup.value.manageAssignedCollectionsGroup.manageAssignedCollections,
|
|
||||||
editAssignedCollections:
|
editAssignedCollections:
|
||||||
this.permissionsGroup.value.manageAssignedCollectionsGroup.editAssignedCollections,
|
this.permissionsGroup.value.manageAssignedCollectionsGroup.editAssignedCollections,
|
||||||
deleteAssignedCollections:
|
deleteAssignedCollections:
|
||||||
|
|
|
@ -4,19 +4,9 @@ export class PermissionsApi extends BaseResponse {
|
||||||
accessEventLogs: boolean;
|
accessEventLogs: boolean;
|
||||||
accessImportExport: boolean;
|
accessImportExport: boolean;
|
||||||
accessReports: boolean;
|
accessReports: boolean;
|
||||||
/**
|
|
||||||
* @deprecated Sep 29 2021: This permission has been split out to `createNewCollections`, `editAnyCollection`, and
|
|
||||||
* `deleteAnyCollection`. It exists here for backwards compatibility with Server versions <= 1.43.0
|
|
||||||
*/
|
|
||||||
manageAllCollections: boolean;
|
|
||||||
createNewCollections: boolean;
|
createNewCollections: boolean;
|
||||||
editAnyCollection: boolean;
|
editAnyCollection: boolean;
|
||||||
deleteAnyCollection: boolean;
|
deleteAnyCollection: boolean;
|
||||||
/**
|
|
||||||
* @deprecated Sep 29 2021: This permission has been split out to `editAssignedCollections` and
|
|
||||||
* `deleteAssignedCollections`. It exists here for backwards compatibility with Server versions <= 1.43.0
|
|
||||||
*/
|
|
||||||
manageAssignedCollections: boolean;
|
|
||||||
editAssignedCollections: boolean;
|
editAssignedCollections: boolean;
|
||||||
deleteAssignedCollections: boolean;
|
deleteAssignedCollections: boolean;
|
||||||
manageCiphers: boolean;
|
manageCiphers: boolean;
|
||||||
|
@ -36,10 +26,6 @@ export class PermissionsApi extends BaseResponse {
|
||||||
this.accessImportExport = this.getResponseProperty("AccessImportExport");
|
this.accessImportExport = this.getResponseProperty("AccessImportExport");
|
||||||
this.accessReports = this.getResponseProperty("AccessReports");
|
this.accessReports = this.getResponseProperty("AccessReports");
|
||||||
|
|
||||||
// For backwards compatibility with Server <= 1.43.0
|
|
||||||
this.manageAllCollections = this.getResponseProperty("ManageAllCollections");
|
|
||||||
this.manageAssignedCollections = this.getResponseProperty("ManageAssignedCollections");
|
|
||||||
|
|
||||||
this.createNewCollections = this.getResponseProperty("CreateNewCollections");
|
this.createNewCollections = this.getResponseProperty("CreateNewCollections");
|
||||||
this.editAnyCollection = this.getResponseProperty("EditAnyCollection");
|
this.editAnyCollection = this.getResponseProperty("EditAnyCollection");
|
||||||
this.deleteAnyCollection = this.getResponseProperty("DeleteAnyCollection");
|
this.deleteAnyCollection = this.getResponseProperty("DeleteAnyCollection");
|
||||||
|
|
|
@ -131,16 +131,11 @@ export class Organization {
|
||||||
}
|
}
|
||||||
|
|
||||||
get canCreateNewCollections() {
|
get canCreateNewCollections() {
|
||||||
return (
|
return this.isManager || this.permissions.createNewCollections;
|
||||||
this.isManager ||
|
|
||||||
(this.permissions.createNewCollections ?? this.permissions.manageAllCollections)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get canEditAnyCollection() {
|
get canEditAnyCollection() {
|
||||||
return (
|
return this.isAdmin || this.permissions.editAnyCollection;
|
||||||
this.isAdmin || (this.permissions.editAnyCollection ?? this.permissions.manageAllCollections)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get canUseAdminCollections() {
|
get canUseAdminCollections() {
|
||||||
|
@ -148,10 +143,7 @@ export class Organization {
|
||||||
}
|
}
|
||||||
|
|
||||||
get canDeleteAnyCollection() {
|
get canDeleteAnyCollection() {
|
||||||
return (
|
return this.isAdmin || this.permissions.deleteAnyCollection;
|
||||||
this.isAdmin ||
|
|
||||||
(this.permissions.deleteAnyCollection ?? this.permissions.manageAllCollections)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get canViewAllCollections() {
|
get canViewAllCollections() {
|
||||||
|
@ -159,17 +151,11 @@ export class Organization {
|
||||||
}
|
}
|
||||||
|
|
||||||
get canEditAssignedCollections() {
|
get canEditAssignedCollections() {
|
||||||
return (
|
return this.isManager || this.permissions.editAssignedCollections;
|
||||||
this.isManager ||
|
|
||||||
(this.permissions.editAssignedCollections ?? this.permissions.manageAssignedCollections)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get canDeleteAssignedCollections() {
|
get canDeleteAssignedCollections() {
|
||||||
return (
|
return this.isManager || this.permissions.deleteAssignedCollections;
|
||||||
this.isManager ||
|
|
||||||
(this.permissions.deleteAssignedCollections ?? this.permissions.manageAssignedCollections)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get canViewAssignedCollections() {
|
get canViewAssignedCollections() {
|
||||||
|
|
Loading…
Reference in New Issue