mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 09:11:10 +00:00
Adds media consumption rules and centralizes authorization role names
This commit is contained in:
1 parent
3e32068573
commit
8a5cb9116e
56 files changed
+767
-80
No files matched your search
+2
-1
@@ -1,5 +1,6 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using FastEndpoints;
|
||||
using Lumina.Application.Common.Infrastructure.Authorization;
|
||||
using Lumina.Contracts.Responses.Authorization;
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
@@ -23,7 +24,7 @@ public class GetRolesEndpointSummary : Summary<GetRolesEndpoint, EmptyRequest>
|
||||
|
||||
Response(200, "The authorization roles are returned.",
|
||||
example: new[] {
|
||||
new RoleResponse(Id: Guid.NewGuid(), "Admin")
|
||||
new RoleResponse(Id: Guid.NewGuid(), AuthorizationRoles.ADMIN)
|
||||
});
|
||||
|
||||
Response(401, "Authentication required.", "application/problem+json",
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using FastEndpoints;
|
||||
using Lumina.Application.Common.Infrastructure.Authorization;
|
||||
using Lumina.Contracts.Requests.Authorization;
|
||||
using Lumina.Contracts.Responses.Authorization;
|
||||
using Lumina.Domain.SharedKernel.Common.Enums.Authorization;
|
||||
@@ -33,7 +34,7 @@ public class GetAuthorizationEndpointSummary : Summary<GetAuthorizationEndpoint,
|
||||
Response(200, "The authorization role and permissions of the account are returned.",
|
||||
example: new AuthorizationResponse(
|
||||
UserId: Guid.NewGuid(),
|
||||
Role: "Admin",
|
||||
Role: AuthorizationRoles.ADMIN,
|
||||
Permissions: new HashSet<AuthorizationPermission>() { AuthorizationPermission.CanRegisterUsers, AuthorizationPermission.CanDeleteUsers }
|
||||
));
|
||||
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using FastEndpoints;
|
||||
using Lumina.Application.Common.Infrastructure.Authorization;
|
||||
using Lumina.Contracts.Requests.Authorization;
|
||||
using Lumina.Contracts.Responses.Authorization;
|
||||
using Lumina.Domain.SharedKernel.Common.Enums.Authorization;
|
||||
@@ -33,7 +34,7 @@ public class GetUserRoleEndpointSummary : Summary<GetUserRoleEndpoint, GetUserRo
|
||||
Response(200, "The authorization role of the user is returned.",
|
||||
example: new RoleResponse(
|
||||
Id: Guid.NewGuid(),
|
||||
RoleName: "Admin"
|
||||
RoleName: AuthorizationRoles.ADMIN
|
||||
));
|
||||
|
||||
Response(401, "Authentication required.", "application/problem+json",
|
||||
|
||||
Reference in new issue
Block a user