Interface IRedbSecurityContext

Assembly: redb.Core.dll

REDB security context
Manages current user and operation mode

public interface IRedbSecurityContext

Properties

CurrentUser

Current user (can be null for system context)

IRedbUser? CurrentUser { get; }

IsAuthenticated

User is authenticated (not system context and user is set)

bool IsAuthenticated { get; }

IsSystemContext

System context (no permission checking)

bool IsSystemContext { get; }

Methods

CreateSystemContext()

Create temporary system context

IDisposable CreateSystemContext()

GetEffectiveUser()

Get effective user

IRedbUser GetEffectiveUser()

GetEffectiveUserId()

Get effective user ID with fallback logic

long GetEffectiveUserId()

SetCurrentUser(IRedbUser?)

Set current user

void SetCurrentUser(IRedbUser? user)