mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 04:53:11 +00:00
23 lines
882 B
C#
23 lines
882 B
C#
using Data.SeaHavenIndustries.Enums;
|
|
|
|
namespace SeaHaven.Services.Interfaces
|
|
{
|
|
/// <summary>
|
|
/// Pure evaluator for team-members permissions. Applies explicit
|
|
/// per-person overrides on top of role defaults; Admin has effective access
|
|
/// to every canonical key regardless of stored values. Unknown or legacy
|
|
/// roles receive no permissions.
|
|
/// </summary>
|
|
public interface ITeamPermissionPolicy
|
|
{
|
|
/// <summary>
|
|
/// Resolves whether a user in <paramref name="roleName"/> holds
|
|
/// <paramref name="permissionKey"/>. <paramref name="overrides"/> is the
|
|
/// person's stored override set (missing key behaves as Unset).
|
|
/// </summary>
|
|
bool IsAllowed(
|
|
string? roleName,
|
|
string permissionKey,
|
|
IReadOnlyDictionary<string, UserPermissionState>? overrides = null);
|
|
}
|
|
}
|