1
0
mirror of https://github.com/bitwarden/server.git synced 2025-01-23 22:01:28 +01:00
bitwarden-server/test/Core.Test/AdminConsole/Helpers/AuthorizationHelpersTests.cs
Thomas Rittson 6a9b7ece2b
[PM-11360] Remove export permission for providers (#5051)
- also fix managed collections export from CLI
2024-12-06 08:07:04 +10:00

39 lines
957 B
C#

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
});
}
}