diff --git a/src/_SampleSystem/SampleSystem.Security/SampleSystemSecuritySystemExtensions.cs b/src/_SampleSystem/SampleSystem.Security/SampleSystemSecuritySystemExtensions.cs index a3dfda27..3437efde 100644 --- a/src/_SampleSystem/SampleSystem.Security/SampleSystemSecuritySystemExtensions.cs +++ b/src/_SampleSystem/SampleSystem.Security/SampleSystemSecuritySystemExtensions.cs @@ -31,7 +31,8 @@ public static ISecuritySystemSettings AddSecurityRoles(this ISecuritySystemSetti SampleSystemSecurityRole.SeManager, new SecurityRoleInfo(new Guid("dbf3556d-7106-4175-b5e4-a32d00bd857a")) { - Children = [SampleSystemSecurityRole.TestVirtualRole] + Children = [SampleSystemSecurityRole.TestVirtualRole], + Operations = [SampleSystemSecurityOperation.BusinessUnitEdit] }) .AddSecurityRole( diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests/BusinessUnitTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests/BusinessUnitTests.cs index 57d9d1e7..b23b8528 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests/BusinessUnitTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests/BusinessUnitTests.cs @@ -122,7 +122,7 @@ public void LoadTreeWithMiddlePermission_RootParentLoadedWithViewMode() var userId = this.AuthHelper.SetUserRole( TextRandomizer.RandomString(10), - new SampleSystemTestPermission(SecurityRole.Administrator, childBu)); + new SampleSystemTestPermission(SampleSystemSecurityRole.SeManager, childBu)); // Act var result = this.Evaluate( diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests/DependencySecurityTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests/DependencySecurityTests.cs index 5b5e7d60..dfee75f4 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests/DependencySecurityTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests/DependencySecurityTests.cs @@ -1,4 +1,5 @@ -using Automation.ServiceEnvironment; + +using Automation.ServiceEnvironment; using FluentAssertions; @@ -9,6 +10,7 @@ using SampleSystem.Domain; using SampleSystem.Generated.DTO; using SampleSystem.IntegrationTests.__Support.TestData; +using SampleSystem.Security; using SampleSystem.WebApiCore.Controllers.Main; namespace SampleSystem.IntegrationTests; @@ -45,7 +47,7 @@ public void SetUp() this.DataHelper.SaveEmployee(login: TestEmployeeLogin); - this.AuthHelper.SetUserRole(TestEmployeeLogin, new SampleSystemTestPermission(SecurityRole.Administrator, this.bu2Ident, null, null)); + this.AuthHelper.SetUserRole(TestEmployeeLogin, new SampleSystemTestPermission(SampleSystemSecurityRole.SeManager, this.bu2Ident)); this.EvaluateWrite( context => diff --git a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests/ExtraQueryableSecurityPathTests.cs b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests/ExtraQueryableSecurityPathTests.cs index a6498c8c..51e1dc57 100644 --- a/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests/ExtraQueryableSecurityPathTests.cs +++ b/src/_SampleSystem/_Tests/SampleSystem.IntegrationTests/ExtraQueryableSecurityPathTests.cs @@ -50,8 +50,8 @@ public void SetUp() this.AuthHelper.SetUserRole( this.TestEmployee.Id, - new SampleSystemTestPermission(SecurityRole.Administrator, this.bu2Ident, null, this.loc1Ident), - new SampleSystemTestPermission(SecurityRole.Administrator, this.bu2Ident, null, this.loc2Ident)); + new SampleSystemTestPermission(SampleSystemSecurityRole.SeManager, this.bu2Ident, null, this.loc1Ident), + new SampleSystemTestPermission(SampleSystemSecurityRole.SeManager, this.bu2Ident, null, this.loc2Ident)); this.TestEmp1 = this.DataHelper.SaveEmployee(coreBusinessUnit: this.bu1Ident, location: this.loc1Ident);