Started improving server shares and general api controller structure
This commit is contained in:
@@ -1,17 +1,21 @@
|
||||
using System.Security.Claims;
|
||||
using MoonlightServers.ApiServer.Database.Entities;
|
||||
using MoonlightServers.ApiServer.Models;
|
||||
using MoonlightServers.Shared.Models;
|
||||
using MoonlightServers.Shared.Enums;
|
||||
|
||||
namespace MoonlightServers.ApiServer.Interfaces;
|
||||
|
||||
public interface IServerAuthorizationFilter
|
||||
{
|
||||
// Return null => skip to next filter / handler
|
||||
// Return any value, instant return
|
||||
// Return any value, instant complete
|
||||
|
||||
public int Priority { get; }
|
||||
|
||||
public Task<ServerAuthorizationResult?> Process(
|
||||
ClaimsPrincipal user,
|
||||
Server server,
|
||||
Func<ServerSharePermission, bool>? filter = null
|
||||
string permissionId,
|
||||
ServerPermissionLevel requiredLevel
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user