mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 14:11:10 +00:00
Implements authorization caching and check in the web client
This commit is contained in:
1 parent
7bca5b1ba3
commit
8eb1b9f13c
108 files changed
+5931
-73
No files matched your search
+16
@@ -0,0 +1,16 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Application.Common.DataAccess.Entities.Authorization;
|
||||
using Lumina.Application.Common.DataAccess.Repositories.Common.Actions;
|
||||
using Lumina.Application.Common.DataAccess.Repositories.Common.Base;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Common.DataAccess.Repositories.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Interface for the repository for authorization permissions.
|
||||
/// </summary>
|
||||
public interface IPermissionRepository : IRepository<PermissionEntity>,
|
||||
IInsertRepositoryAction<PermissionEntity>,
|
||||
IGetAllRepositoryAction<PermissionEntity>
|
||||
{
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Application.Common.DataAccess.Entities.Authorization;
|
||||
using Lumina.Application.Common.DataAccess.Repositories.Common.Actions;
|
||||
using Lumina.Application.Common.DataAccess.Repositories.Common.Base;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Common.DataAccess.Repositories.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Interface for the repository for authorization role permissions.
|
||||
/// </summary>
|
||||
public interface IRolePermissionRepository : IRepository<RolePermissionEntity>,
|
||||
IInsertRepositoryAction<RolePermissionEntity>
|
||||
{
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using ErrorOr;
|
||||
using Lumina.Application.Common.DataAccess.Entities.Authorization;
|
||||
using Lumina.Application.Common.DataAccess.Repositories.Common.Actions;
|
||||
using Lumina.Application.Common.DataAccess.Repositories.Common.Base;
|
||||
using Lumina.Domain.Common.Enums.Authorization;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Common.DataAccess.Repositories.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Interface for the repository for authorization roles.
|
||||
/// </summary>
|
||||
public interface IRoleRepository : IRepository<RoleEntity>,
|
||||
IInsertRepositoryAction<RoleEntity>,
|
||||
IGetAllRepositoryAction<RoleEntity>
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a role identified by <paramref name="roleType"/> from the repository, if it exists.
|
||||
/// </summary>
|
||||
/// <param name="roleType">The type of role to get.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="ErrorOr{TValue}"/> containing either a <see cref="RoleEntity"/> if found, or an error.</returns>
|
||||
Task<ErrorOr<RoleEntity?>> GetByNameAsync(AuthorizationRole roleType, CancellationToken cancellationToken);
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Application.Common.DataAccess.Entities.Authorization;
|
||||
using Lumina.Application.Common.DataAccess.Repositories.Common.Actions;
|
||||
using Lumina.Application.Common.DataAccess.Repositories.Common.Base;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Common.DataAccess.Repositories.Authorization;
|
||||
|
||||
/// <summary>
|
||||
/// Interface for the repository for authorization user roles.
|
||||
/// </summary>
|
||||
public interface IUserRoleRepository : IRepository<UserRoleEntity>,
|
||||
IInsertRepositoryAction<UserRoleEntity>
|
||||
{
|
||||
}
|
||||
@@ -20,7 +20,7 @@ public interface IUserRepository : IRepository<UserEntity>,
|
||||
IUpdateRepositoryAction<UserEntity>
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a username identified by <paramref name="username"/> from the repository, if it exists.
|
||||
/// Gets a user identified by <paramref name="username"/> from the repository, if it exists.
|
||||
/// </summary>
|
||||
/// <param name="username">The username of the user to get.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
|
||||
Reference in new issue
Block a user