Implemented roles and action timestamps. Added oermissions selector and interfaces
This commit was merged in pull request #3.
This commit is contained in:
21
Moonlight.Frontend/Models/PermissionCategory.cs
Normal file
21
Moonlight.Frontend/Models/PermissionCategory.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user