Split collections permissions (#1558)

* Split collections permissions

* Remove old permissions

There is no backwards compatibility issue since these permissions are unused.

* Remove unused imports
This commit is contained in:
Matt Gibson 2021-10-05 11:12:55 -05:00 committed by GitHub
parent 6109091ec0
commit 73eb3c2c1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View file

@ -6,8 +6,11 @@ namespace Bit.Core.Models.Data
public bool AccessEventLogs { get; set; }
public bool AccessImportExport { get; set; }
public bool AccessReports { get; set; }
public bool ManageAssignedCollections { get; set; }
public bool ManageAllCollections { get; set; }
public bool EditAssignedCollections { get; set; }
public bool DeleteAssignedCollections { get; set; }
public bool CreateNewCollections { get; set; }
public bool EditAnyCollection { get; set; }
public bool DeleteAnyCollection { get; set; }
public bool ManageGroups { get; set; }
public bool ManagePolicies { get; set; }
public bool ManageSso { get; set; }

View file

@ -86,8 +86,11 @@ namespace Bit.Core.Models.Domain
public bool canAccessEventLogs => IsAdmin || Permissions.AccessEventLogs;
public bool canAccessImportExport => IsAdmin || Permissions.AccessImportExport;
public bool canAccessReports => IsAdmin || Permissions.AccessReports;
public bool canManageAllCollections => IsAdmin || Permissions.ManageAllCollections;
public bool canManageAssignedCollections => IsManager || Permissions.ManageAssignedCollections;
public bool canCreateNewCollections => IsAdmin || Permissions.CreateNewCollections;
public bool canEditAnyCollection => IsAdmin || Permissions.EditAnyCollection;
public bool canDeleteAnyCollection => IsAdmin || Permissions.DeleteAnyCollection;
public bool canEditAssignedCollections => IsManager || Permissions.EditAssignedCollections;
public bool canDeleteAssignedCollections => IsManager || Permissions.DeleteAssignedCollections;
public bool canManageGroups => IsAdmin || Permissions.ManageGroups;
public bool canManagePolicies => IsAdmin || Permissions.ManagePolicies;
public bool canManageUser => IsAdmin || Permissions.ManageUsers;