Summary Update.

This commit is contained in:
2026-06-06 23:38:50 -04:00
parent dd75ca4b06
commit 2916d17868
30 changed files with 1231 additions and 21 deletions

View File

@@ -2,10 +2,24 @@ using SurrealDb.Net.Models;
namespace RelayServer.Models;
/// <summary>
/// Surreal record for the `channel_permissions` table. Per-(channel, role) override of a
/// role's base permissions.
///
/// Allow and Deny are independent masks (NOT a tri-state). Deny wins over Allow when both
/// have the same flag set. Bits not set in either fall through to the role's base permissions.
/// </summary>
public class ChannelPermissions : Record
{
/// <summary>"channels:xyz" — which channel this override applies in.</summary>
public required string ChannelId { get; set; }
/// <summary>"roles:abc" — which role this override applies to.</summary>
public required string RoleId { get; set; }
/// <summary>Permissions explicitly granted here (overrides "role doesn't have it" for this channel).</summary>
public PermissionFlags Allow { get; set; }
/// <summary>Permissions explicitly denied here. Wins over Allow.</summary>
public PermissionFlags Deny { get; set; }
}