IPermissionManager
Interface IPermissionManager
Namespace: SwiftlyS2.Shared.Permissions
Assembly: SwiftlyS2.CS2.dll
public interface IPermissionManagerMethods
AddPermission(ulong, string)
Adds a permission to a player.
void AddPermission(ulong steamId, string permission)Parameters
AddSubPermission(string, string)
Adds a sub-permission to a permission.
void AddSubPermission(string permission, string subPermission)Parameters
- permission string — The permission to add the sub-permission to.
- subPermission string — The sub-permission to add.
ClearPermission(ulong)
Clear all permission from a player.
void ClearPermission(ulong steamId)Parameters
- steamId ulong — The Steam ID of the player.
PlayerHasPermission(ulong, string)
Checks if a player has a permission. Support 'xxx.*' for wildcard permissions.
bool PlayerHasPermission(ulong steamId, string permission)Parameters
Returns
- bool — True if the player has the permission, false otherwise.
PlayerHasPermissions(ulong, IEnumerable<string>)
Checks if a player has all permissions in the list. Support 'xxx.*' for wildcard permissions.
bool PlayerHasPermissions(ulong steamId, IEnumerable<string> permissions)Parameters
- steamId ulong — The Steam ID of the player.
- permissions IEnumerable<string> — The list of permissions to check.
Returns
- bool — True if the player has all the permissions, false otherwise.
RemovePermission(ulong, string)
Removes a permission from a player.
void RemovePermission(ulong steamId, string permission)Parameters
RemoveSubPermission(string, string)
Removes a sub-permission from a permission.
void RemoveSubPermission(string permission, string subPermission)Parameters