using GB5Shared.DTO.Framework.Login; using SwDAL.DTO.UserResourceRole; namespace SwDAL.CustomCode.UserResourceRole; public interface IUserResourceRoleDAL { Task> GetGrantsForUser(int userId, LoginDTO loginDTO, CancellationToken ct); Task> GetGranteesForServer(int dbServerId, LoginDTO loginDTO, CancellationToken ct); Task> GetGranteesForClientDb(int clientDbId, LoginDTO loginDTO, CancellationToken ct); /// Returns the raw granted role, or null if no grant row matches. Most-specific- /// wins (ClientDb over DbServer) is resolved by the query itself. Task GetEffectiveRole(int userId, int? dbServerId, int? clientDbId, LoginDTO loginDTO, CancellationToken ct); Task UpsertGrant(UserResourceRoleDTO dto, LoginDTO loginDTO, CancellationToken ct); Task RevokeGrant(RevokeUserResourceRoleDTO dto, LoginDTO loginDTO, CancellationToken ct); }