Moves media library scanning to domain layer

This commit is contained in:
BinaryAlley committed 2025-02-16 21:45:26 +02:00
1 parent 8b51abe0b2
commit c4246d2e69
209 files changed
+3793 -641

No files matched your search

@@ -81,7 +81,8 @@ public class RegisterUserCommandHandler : IRequestHandler<RegisterUserCommand, E
Libraries = [],
UserPermissions = [],
UserRole = null,
CreatedBy = id
CreatedBy = id,
LibraryScans = [],
};
// if the user enabled two factor auth, include a QR with the totp secret
if (request.Use2fa)
@@ -12,8 +12,8 @@ namespace Lumina.Application.Core.UsersManagement.Authorization.Commands.UpdateU
/// <summary>
/// Command for updating the authorization role and permissions of a user.
/// </summary>
/// <param name="UserId">The Id of the user.</param>
/// <param name="RoleId">The Id of the role.</param>
/// <param name="UserId">The unique identifier of the user.</param>
/// <param name="RoleId">The unique identifier of the role.</param>
/// <param name="Permissions">The collection of Ids of the permissions of the user.</param>
[DebuggerDisplay("UserId: {UserId}")]
public record UpdateUserRoleAndPermissionsCommand(
@@ -125,7 +125,8 @@ public class UpdateUserRoleAndPermissionsCommandHandler : IRequestHandler<Update
PermissionId = permissionId,
Permission = getPermissionsResult.Value.First(permission => permission.Id == permissionId),
User = userToUpdate
}).ToList()
}).ToList(),
LibraryScans = userToUpdate.LibraryScans
};
// save changes and return result
@@ -11,7 +11,7 @@ namespace Lumina.Application.Core.UsersManagement.Authorization.Queries.GetAutho
/// <summary>
/// Query for retrieving the authorization roles and permissions of an account.
/// </summary>
/// <param name="UserId">The Id of the user for whom to get the authorization.</param>
/// <param name="UserId">The unique identifier of the user for whom to get the authorization.</param>
[DebuggerDisplay("UserId: {UserId}")]
public record GetAuthorizationQuery(
Guid? UserId
@@ -12,7 +12,7 @@ namespace Lumina.Application.Core.UsersManagement.Authorization.Queries.GetUserP
/// <summary>
/// Query 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.</param>
/// <param name="UserId">The unique identifier of the user for whom to get the authorization permissions.</param>
[DebuggerDisplay("UserId: {UserId}")]
public record GetUserPermissionsQuery(
Guid? UserId
@@ -11,7 +11,7 @@ namespace Lumina.Application.Core.UsersManagement.Authorization.Queries.GetUserR
/// <summary>
/// Query 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.</param>
/// <param name="UserId">The unique identifier of the user for whom to get the authorization role.</param>
[DebuggerDisplay("UserId: {UserId}")]
public record GetUserRoleQuery(
Guid? UserId