mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 11:11:10 +00:00
Moves media library scanning to domain layer
This commit is contained in:
1 parent
8b51abe0b2
commit
c4246d2e69
209 files changed
+3793
-641
No files matched your search
+2
-1
@@ -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)
|
||||
|
||||
+2
-2
@@ -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(
|
||||
|
||||
+2
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user