mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 03:11:10 +00:00
Adds authorization permissions administrator dashboard
This commit is contained in:
1 parent
152cb48050
commit
583b8db865
106 files changed
+5916
-2085
No files matched your search
+2
-2
@@ -10,11 +10,11 @@ namespace Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
/// Represents the response model for an account authorization request.
|
||||
/// </summary>
|
||||
/// <param name="UserId">The Id of the user for whom the authorization is retrieved.</param>
|
||||
/// <param name="Roles">The collection of roles associated to the user.</param>
|
||||
/// <param name="Role">The role associated to the user.</param>
|
||||
/// <param name="Permissions">The collection of permissions associated to the user.</param>
|
||||
[DebuggerDisplay("UserId: {UserId}")]
|
||||
public record GetAuthorizationResponse(
|
||||
Guid UserId,
|
||||
string[] Roles,
|
||||
string? Role,
|
||||
AuthorizationPermission[] Permissions
|
||||
);
|
||||
@@ -1,15 +1,13 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Enums.Authorization;
|
||||
using System;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a model for an authorization role.
|
||||
/// Represents a model for an authorization role with its permissions.
|
||||
/// </summary>
|
||||
/// <param name="Id">The Id of the authorization role.</param>
|
||||
/// <param name="Role">The authorization role.</param>
|
||||
/// <param name="Permissions">The permissions of the authorization role.</param>
|
||||
public record RolePermissionsModel(
|
||||
RoleModel Role,
|
||||
PermissionModel[] Permissions
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
/// </summary>
|
||||
/// <param name="RoleId">The Id of the role.</param>
|
||||
/// <param name="RoleName">The name of the role.</param>
|
||||
/// <param name="Permissions">The collection or permissions of the role.</param>
|
||||
/// <param name="Permissions">The collection of Ids of the permissions of the role.</param>
|
||||
public record UpdateRoleRequestModel(
|
||||
Guid RoleId,
|
||||
string? RoleName,
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the request model for updating the authorization role and permissions of a user.
|
||||
/// </summary>
|
||||
/// <param name="RoleId">The Id of the user.</param>
|
||||
/// <param name="RoleId">The Id of the role.</param>
|
||||
/// <param name="Permissions">The collection of Ids of the permissions of the user.</param>
|
||||
public record UpdateUserRoleAndPermissionsRequestModel(
|
||||
Guid UserId,
|
||||
Guid? RoleId,
|
||||
List<Guid>? Permissions
|
||||
);
|
||||
@@ -0,0 +1,15 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Models.UsersManagement;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a model for a user with its authorization permissions.
|
||||
/// </summary>
|
||||
/// <param name="User">The user.</param>
|
||||
/// <param name="Permissions">The authorization permissions of the user.</param>
|
||||
public record UserPermissionsModel(
|
||||
UserModel User,
|
||||
PermissionModel[] Permissions
|
||||
);
|
||||
Reference in new issue
Block a user