Implemented user deletion service and IUserDeleteHandler for plugins to hook into

This commit is contained in:
2025-08-19 21:35:43 +02:00
parent 8a63a3448a
commit 60178dc54b
5 changed files with 96 additions and 2 deletions

View File

@@ -0,0 +1,27 @@
namespace Moonlight.ApiServer.Models;
public class UserDeleteValidationResult
{
public bool IsAllowed { get; set; }
public string Reason { get; set; }
public static UserDeleteValidationResult Allow()
{
return new UserDeleteValidationResult()
{
IsAllowed = true
};
}
public static UserDeleteValidationResult Deny()
=> Deny("No reason provided");
public static UserDeleteValidationResult Deny(string reason)
{
return new UserDeleteValidationResult()
{
IsAllowed = false,
Reason = reason
};
}
}