mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 13: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
@@ -0,0 +1,18 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Domain.Common.Enums.Authorization;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.DTO.Authentication;
|
||||
|
||||
/// <summary>
|
||||
/// Data transfer object for an authorization permission.
|
||||
/// </summary>
|
||||
/// <param name="Id">The Id of the permission.</param>
|
||||
/// <param name="PermissionName">The name of the permission.</param>
|
||||
[DebuggerDisplay("Id: {Id}, PermissionName: {PermissionName}")]
|
||||
public record PermissionDto(
|
||||
Guid Id,
|
||||
AuthorizationPermission PermissionName
|
||||
);
|
||||
@@ -0,0 +1,17 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.DTO.Authentication;
|
||||
|
||||
/// <summary>
|
||||
/// Data transfer object for an authorization role.
|
||||
/// </summary>
|
||||
/// <param name="Id">The Id of the role.</param>
|
||||
/// <param name="RoleName">The name of the role.</param>
|
||||
[DebuggerDisplay("Id: {Id}, RoleName: {RoleName}")]
|
||||
public record RoleDto(
|
||||
Guid Id,
|
||||
string RoleName
|
||||
);
|
||||
@@ -5,7 +5,7 @@ using System.Diagnostics;
|
||||
namespace Lumina.Contracts.DTO.MediaContributors;
|
||||
|
||||
/// <summary>
|
||||
/// Repository entity for a media contributor.
|
||||
/// Data transfer object for a media contributor.
|
||||
/// </summary>
|
||||
/// <param name="Name">The name details of the media contributor, including display and legal names.</param>
|
||||
/// <param name="Role">The role details of the media contributor, including the role name and category.</param>
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Diagnostics;
|
||||
namespace Lumina.Contracts.DTO.MediaContributors;
|
||||
|
||||
/// <summary>
|
||||
/// Repository entity for a media contributor name.
|
||||
/// Data transfer object for a media contributor name.
|
||||
/// </summary>
|
||||
/// <param name="DisplayName">The display name of the media contributor.</param>
|
||||
/// <param name="LegalName">The legal name of the media contributor.</param>
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Diagnostics;
|
||||
namespace Lumina.Contracts.DTO.MediaContributors;
|
||||
|
||||
/// <summary>
|
||||
/// Repository entity for a media contributor role.
|
||||
/// Data transfer object for a media contributor role.
|
||||
/// </summary>
|
||||
/// <param name="Name">The name of the role assigned to the media contributor.</param>
|
||||
/// <param name="Category">The category of the role.</param>
|
||||
|
||||
@@ -5,13 +5,9 @@ using System.Diagnostics;
|
||||
namespace Lumina.Contracts.DTO.MediaLibrary.Management;
|
||||
|
||||
/// <summary>
|
||||
/// Repository entity for a media library content location.
|
||||
/// Data transfer object for a media library content location.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("Path: {Path}")]
|
||||
public class LibraryContentLocationDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the path of the media library content location.
|
||||
/// </summary>
|
||||
public required string Path { get; set; }
|
||||
}
|
||||
public record LibraryContentLocationDto(
|
||||
string Path
|
||||
);
|
||||
@@ -6,7 +6,7 @@ using System.Diagnostics;
|
||||
namespace Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary;
|
||||
|
||||
/// <summary>
|
||||
/// Repository entity for ISBN information.
|
||||
/// Data transfer object for ISBN information.
|
||||
/// </summary>
|
||||
/// <param name="Value">The ISBN value.</param>
|
||||
/// <param name="Format">The format of the ISBN (e.g., ISBN-10 or ISBN-13).</param>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request for adding an authorization role.
|
||||
/// </summary>
|
||||
/// <param name="RoleName">The name of the role. Required.</param>
|
||||
/// <param name="Permissions">The collection or permissions of the role. Required.</param>
|
||||
[DebuggerDisplay("RoleName: {RoleName}")]
|
||||
public record AddRoleRequest(
|
||||
string? RoleName,
|
||||
List<Guid>? Permissions
|
||||
);
|
||||
@@ -0,0 +1,15 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request for deleting an authorization role.
|
||||
/// </summary>
|
||||
/// <param name="RoleId">The Id of the role. Required.</param>
|
||||
[DebuggerDisplay("RoleId: {RoleId}")]
|
||||
public record DeleteRoleRequest(
|
||||
Guid? RoleId
|
||||
);
|
||||
@@ -0,0 +1,15 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Requests.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to get the authorization permissions of a role identified by <paramref name="RoleId"/>.
|
||||
/// </summary>
|
||||
/// <param name="RoleId">The Id of authorization role. Required.</param>
|
||||
[DebuggerDisplay("RoleId: {RoleId}")]
|
||||
public record GetRolePermissionsRequest(
|
||||
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 an existing authorization role.
|
||||
/// </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>
|
||||
[DebuggerDisplay("RoleName: {RoleName}")]
|
||||
public record UpdateRoleRequest(
|
||||
Guid? RoleId,
|
||||
string? RoleName,
|
||||
List<Guid>? Permissions
|
||||
);
|
||||
+2
-2
@@ -14,8 +14,8 @@ namespace Lumina.Contracts.Responses.Authorization;
|
||||
/// <param name="Roles">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 GetAuthorizationResponse(
|
||||
public record AuthorizationResponse(
|
||||
Guid UserId,
|
||||
IReadOnlySet<AuthorizationRole> Roles,
|
||||
IReadOnlySet<string> Roles,
|
||||
IReadOnlySet<AuthorizationPermission> Permissions
|
||||
);
|
||||
@@ -0,0 +1,16 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Domain.Common.Enums.Authorization;
|
||||
using System;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Responses.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the response model for a request for an of authorization permission.
|
||||
/// </summary>
|
||||
/// <param name="Id">The Id of the requested authorization permission.</param>
|
||||
/// <param name="PermissionName">The requested authorization permission.</param>
|
||||
public record PermissionResponse(
|
||||
Guid Id,
|
||||
AuthorizationPermission PermissionName
|
||||
);
|
||||
@@ -0,0 +1,15 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.DTO.Authentication;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Responses.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an authorizaton role permissions response.
|
||||
/// </summary>
|
||||
/// <param name="Role">The authorization role.</param>
|
||||
/// <param name="Permissions">The permissions of the authorization role.</param>
|
||||
public record RolePermissionsResponse(
|
||||
RoleDto Role,
|
||||
PermissionDto[] Permissions
|
||||
);
|
||||
@@ -0,0 +1,15 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Responses.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the response model for a request for an authorization role.
|
||||
/// </summary>
|
||||
/// <param name="Id">The Id of the requested authorization role.</param>
|
||||
/// <param name="RoleName">The requested authorization role.</param>
|
||||
public record RoleResponse(
|
||||
Guid Id,
|
||||
string RoleName
|
||||
);
|
||||
Reference in new issue
Block a user