mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
Make custom users subject to collection settings (#9231)
* Affects ManageUsers and ManageGroups
This commit is contained in:
@@ -85,14 +85,26 @@ export class CollectionAdminView extends CollectionView {
|
|||||||
* Whether the user can modify user access to this collection
|
* Whether the user can modify user access to this collection
|
||||||
*/
|
*/
|
||||||
canEditUserAccess(org: Organization, flexibleCollectionsV1Enabled: boolean): boolean {
|
canEditUserAccess(org: Organization, flexibleCollectionsV1Enabled: boolean): boolean {
|
||||||
return this.canEdit(org, flexibleCollectionsV1Enabled) || org.permissions.manageUsers;
|
const allowAdminAccessToAllCollectionItems =
|
||||||
|
!flexibleCollectionsV1Enabled || org.allowAdminAccessToAllCollectionItems;
|
||||||
|
|
||||||
|
return (
|
||||||
|
(org.permissions.manageUsers && allowAdminAccessToAllCollectionItems) ||
|
||||||
|
this.canEdit(org, flexibleCollectionsV1Enabled)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the user can modify group access to this collection
|
* Whether the user can modify group access to this collection
|
||||||
*/
|
*/
|
||||||
canEditGroupAccess(org: Organization, flexibleCollectionsV1Enabled: boolean): boolean {
|
canEditGroupAccess(org: Organization, flexibleCollectionsV1Enabled: boolean): boolean {
|
||||||
return this.canEdit(org, flexibleCollectionsV1Enabled) || org.permissions.manageGroups;
|
const allowAdminAccessToAllCollectionItems =
|
||||||
|
!flexibleCollectionsV1Enabled || org.allowAdminAccessToAllCollectionItems;
|
||||||
|
|
||||||
|
return (
|
||||||
|
(org.permissions.manageGroups && allowAdminAccessToAllCollectionItems) ||
|
||||||
|
this.canEdit(org, flexibleCollectionsV1Enabled)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user