mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 11:11:10 +00:00
Adds authorization roles administrator dashboard
This commit is contained in:
1 parent
290af03c83
commit
1df31515fb
191 files changed
+6189
-806
No files matched your search
+9
-10
@@ -24,12 +24,12 @@ public class UserAuthorizationEntityMappingTests
|
||||
UserAuthorizationEntity entity = new()
|
||||
{
|
||||
UserId = Guid.NewGuid(),
|
||||
Roles = new HashSet<AuthorizationRole> { AuthorizationRole.Admin },
|
||||
Roles = new HashSet<string> { "Admin" },
|
||||
Permissions = new HashSet<AuthorizationPermission> { AuthorizationPermission.CanViewUsers }
|
||||
};
|
||||
|
||||
// Act
|
||||
GetAuthorizationResponse result = entity.ToResponse();
|
||||
AuthorizationResponse result = entity.ToResponse();
|
||||
|
||||
// Assert
|
||||
result.Should().NotBeNull();
|
||||
@@ -45,12 +45,12 @@ public class UserAuthorizationEntityMappingTests
|
||||
UserAuthorizationEntity entity = new()
|
||||
{
|
||||
UserId = Guid.NewGuid(),
|
||||
Roles = new HashSet<AuthorizationRole>(),
|
||||
Roles = new HashSet<string>(),
|
||||
Permissions = new HashSet<AuthorizationPermission>()
|
||||
};
|
||||
|
||||
// Act
|
||||
GetAuthorizationResponse result = entity.ToResponse();
|
||||
AuthorizationResponse result = entity.ToResponse();
|
||||
|
||||
// Assert
|
||||
result.Should().NotBeNull();
|
||||
@@ -66,10 +66,9 @@ public class UserAuthorizationEntityMappingTests
|
||||
UserAuthorizationEntity entity = new()
|
||||
{
|
||||
UserId = Guid.NewGuid(),
|
||||
Roles = new HashSet<AuthorizationRole>
|
||||
Roles = new HashSet<string>
|
||||
{
|
||||
AuthorizationRole.Admin,
|
||||
AuthorizationRole.None
|
||||
"Admin"
|
||||
},
|
||||
Permissions = new HashSet<AuthorizationPermission>
|
||||
{
|
||||
@@ -80,7 +79,7 @@ public class UserAuthorizationEntityMappingTests
|
||||
};
|
||||
|
||||
// Act
|
||||
GetAuthorizationResponse result = entity.ToResponse();
|
||||
AuthorizationResponse result = entity.ToResponse();
|
||||
|
||||
// Assert
|
||||
result.Should().NotBeNull();
|
||||
@@ -99,12 +98,12 @@ public class UserAuthorizationEntityMappingTests
|
||||
UserAuthorizationEntity entity = new()
|
||||
{
|
||||
UserId = Guid.Parse(userIdString),
|
||||
Roles = new HashSet<AuthorizationRole> { AuthorizationRole.Admin },
|
||||
Roles = new HashSet<string> { "Admin" },
|
||||
Permissions = new HashSet<AuthorizationPermission> { AuthorizationPermission.CanViewUsers }
|
||||
};
|
||||
|
||||
// Act
|
||||
GetAuthorizationResponse result = entity.ToResponse();
|
||||
AuthorizationResponse result = entity.ToResponse();
|
||||
|
||||
// Assert
|
||||
result.Should().NotBeNull();
|
||||
|
||||
Reference in new issue
Block a user