mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 00:22:50 -05:00
[PM-11360] Remove export permission for providers (#5051)
- also fix managed collections export from CLI
This commit is contained in:
@ -0,0 +1,38 @@
|
||||
using Bit.Core.Models.Data;
|
||||
using Xunit;
|
||||
|
||||
namespace Bit.Core.Test.AdminConsole.Helpers;
|
||||
|
||||
public class AuthorizationHelpersTests
|
||||
{
|
||||
[Fact]
|
||||
public void Permissions_Invert_InvertsAllPermissions()
|
||||
{
|
||||
var sut = new Permissions
|
||||
{
|
||||
AccessEventLogs = true,
|
||||
AccessReports = true,
|
||||
DeleteAnyCollection = true,
|
||||
ManagePolicies = true,
|
||||
ManageScim = true
|
||||
};
|
||||
|
||||
var result = sut.Invert();
|
||||
|
||||
Assert.True(result is
|
||||
{
|
||||
AccessEventLogs: false,
|
||||
AccessImportExport: true,
|
||||
AccessReports: false,
|
||||
CreateNewCollections: true,
|
||||
EditAnyCollection: true,
|
||||
DeleteAnyCollection: false,
|
||||
ManageGroups: true,
|
||||
ManagePolicies: false,
|
||||
ManageSso: true,
|
||||
ManageUsers: true,
|
||||
ManageResetPassword: true,
|
||||
ManageScim: false
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user