Implemented roles and action timestamps. Added oermissions selector and interfaces

This commit was merged in pull request #3.
This commit is contained in:
2026-01-14 19:03:17 +01:00
parent 43d43a6d7d
commit 06063b94b3
33 changed files with 1192 additions and 5 deletions

View File

@@ -0,0 +1,17 @@
using System.Diagnostics.CodeAnalysis;
namespace Moonlight.Frontend.Models;
public class Permission
{
public string Identifier { get; init; }
public string Name { get; init; }
public string Description { get; init; }
public Permission(string identifier, string name, string description)
{
Identifier = identifier;
Name = name;
Description = description;
}
}

View File

@@ -0,0 +1,21 @@
using System.Diagnostics.CodeAnalysis;
namespace Moonlight.Frontend.Models;
public record PermissionCategory
{
public string Name { get; init; }
// Used to prevent the IL-Trimming from removing this type as its dynamically assigned a type, and we
// need it to work properly
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)]
public Type Icon { get; init; }
public Permission[] Permissions { get; init; }
public PermissionCategory(string name, Type icon, Permission[] permissions)
{
Name = name;
Icon = icon;
Permissions = permissions;
}
}