Skip to main content

UserPermissions

A static class in Alta.Authentication, the global namespace.

Permission name constants and checks against the logged-in user's API policies. Checks the local logged-in account, so it is mainly a client thing.

Fields​

MemberWhat it is
const string AdminVrModesPolicy name admin_vr_modes.
const string DebugFeaturesPolicy name debug_features.
const string DeveloperPolicy name server_owner (note: not developer).
const string ModeratorPolicy name moderator.
const string PlayOfflinePolicy name play_offline.
1 private and internal field
MemberWhat it is
private static readonly Lazy<IHighLevelApiClient> apiClientLazily resolved API client used to read the logged-in user.

Methods​

MemberWhat it is
static PlayerSubscriberStatus GetPlayerSubscriberStatus()Returns Developer if the logged-in user has debug_features, otherwise None.
static bool HasPermission(string permission)Whether the logged-in user's policies include the given name. False when nobody is logged in.