Permission Levels

Read time 1 minute Package: Nalix.Codec / Nalix.Network
On this page

PermissionLevel defines the coarse-grained authority levels used throughout the Nalix ecosystem for access control.

Source mapping

  • src/Nalix.Abstractions/Security/PermissionLevel.cs

Enum Definition

ValueNameDescription
0NONENo authority assigned.
10POW_VERIFIEDConnection has passed the Proof-of-Work challenge but has not yet completed handshake.
20ESTABLISHEDSecure session has been established.
25GUESTMinimal access for anonymous or guest users.
50READ_ONLYRead-only access.
100USERStandard authenticated user.
175SUPERVISORElevated privileges within a limited scope.
200TENANT_ADMINISTRATORAdministrative control over a single tenant or organization.
225SYSTEM_ADMINISTRATORSystem-wide administrative authority.
255OWNERHighest authority level with unrestricted control.

Usage in Attributes

The [PacketPermission] attribute uses these levels to enforce security early in the pipeline.

[PacketOpcode(0x1001)]
[PacketPermission(PermissionLevel.SYSTEM_ADMINISTRATOR)]
public void ResetServer(IPacketContext<Control> context)
{
    // Only users with Level >= SYSTEM_ADMINISTRATOR can reach here
}