Adds authorization permissions administrator dashboard

This commit is contained in:
BinaryAlley committed 2024-12-22 19:17:47 +02:00
1 parent 152cb48050
commit 583b8db865
106 files changed
+5916 -2085

No files matched your search

@@ -0,0 +1,13 @@
#region ========================================================================= USING =====================================================================================
using System;
#endregion
namespace Lumina.Contracts.Requests.Authorization;
/// <summary>
/// Represents the request model for retrieving the authorization permissions of a user identified by <paramref name="UserId"/>.
/// </summary>
/// <param name="UserId">The Id of the user for whom to get the authorization permissions. Required.</param>
public record GetUserPermissionsRequest(
Guid? UserId
);
@@ -0,0 +1,13 @@
#region ========================================================================= USING =====================================================================================
using System;
#endregion
namespace Lumina.Contracts.Requests.Authorization;
/// <summary>
/// Represents the request model for retrieving the authorization role of a user identified by <paramref name="UserId"/>.
/// </summary>
/// <param name="UserId">The Id of the user for whom to get the authorization role. Required.</param>
public record GetUserRoleRequest(
Guid? UserId
);
@@ -11,7 +11,7 @@ namespace Lumina.Contracts.Requests.Authorization;
/// </summary>
/// <param name="RoleId">The Id of the role. Required.</param>
/// <param name="RoleName">The name of the role. Required.</param>
/// <param name="Permissions">The collection or permissions of the role. Required.</param>
/// <param name="Permissions">The collection of Ids of the permissions of the role. Required.</param>
[DebuggerDisplay("RoleName: {RoleName}")]
public record UpdateRoleRequest(
Guid? RoleId,
@@ -0,0 +1,20 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Requests.Authorization;
/// <summary>
/// Represents a request for updating the authorization role and permissions of a user.
/// </summary>
/// <param name="RoleId">The Id of the user. Required.</param>
/// <param name="RoleId">The Id of the role. Required.</param>
/// <param name="Permissions">The collection of Ids of the permissions of the role. Required.</param>
[DebuggerDisplay("UserId: {UserId}")]
public record UpdateUserRoleAndPermissionsRequest(
Guid? UserId,
Guid? RoleId,
List<Guid>? Permissions
);
@@ -11,11 +11,11 @@ namespace Lumina.Contracts.Responses.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 collection of roles associated to the user.</param>
/// <param name="Permissions">The collection of permissions associated to the user.</param>
[DebuggerDisplay("UserId: {UserId}")]
public record AuthorizationResponse(
Guid UserId,
IReadOnlySet<string> Roles,
string? Role,
IReadOnlySet<AuthorizationPermission> Permissions
);