Constants

AUTH_LEVEL_PLAYER

AUTH_LEVEL_PLAYER

AUTH_LEVEL_MODERATOR

AUTH_LEVEL_MODERATOR

AUTH_LEVEL_ADMIN

AUTH_LEVEL_ADMIN

AUTH_LEVEL_SUPERADMIN

AUTH_LEVEL_SUPERADMIN

AUTH_LEVEL_MASTERADMIN

AUTH_LEVEL_MASTERADMIN

AUTH_NAME_PLAYER

AUTH_NAME_PLAYER

AUTH_NAME_MODERATOR

AUTH_NAME_MODERATOR

AUTH_NAME_ADMIN

AUTH_NAME_ADMIN

AUTH_NAME_SUPERADMIN

AUTH_NAME_SUPERADMIN

AUTH_NAME_MASTERADMIN

AUTH_NAME_MASTERADMIN

CB_AUTH_LEVEL_CHANGED

CB_AUTH_LEVEL_CHANGED

ECHO_GRANT_LEVEL

ECHO_GRANT_LEVEL

ECHO_REVOKE_LEVEL

ECHO_REVOKE_LEVEL

Properties

Methods

getUsageInformation()

getUsageInformation() 

Gets Information about the Class, and a List of the Public Method

__construct()

__construct(\ManiaControl\ManiaControl  $maniaControl) 

Construct a new Authentication Manager instance

Parameters

\ManiaControl\ManiaControl $maniaControl

getAuthLevelName()

getAuthLevelName(mixed  $authLevelInt) : string

Get Name of the Authentication Level from Level Int

Parameters

mixed $authLevelInt

Returns

string

getAuthLevelInt()

getAuthLevelInt(mixed  $authLevelParam) : integer

Get the Authentication Level Int from the given Param

Parameters

mixed $authLevelParam

Returns

integer

getAuthLevel()

getAuthLevel(string  $authLevelName) : integer

Get Authentication Level Int from Level Name

Parameters

string $authLevelName

Returns

integer

getAuthLevelAbbreviation()

getAuthLevelAbbreviation(mixed  $authLevelInt) : string

Get the Abbreviation of the Authentication Level from Level Int

Parameters

mixed $authLevelInt

Returns

string

getConnectedAdmins()

getConnectedAdmins(integer  $authLevel = self::AUTH_LEVEL_MODERATOR) : array<mixed,\ManiaControl\Players\Player>

Get all connected Players with at least the given Auth Level

Parameters

integer $authLevel

Returns

array<mixed,\ManiaControl\Players\Player>

checkRight()

checkRight(\ManiaControl\Players\Player  $player, integer|\ManiaControl\Settings\Setting  $neededAuthLevel) : boolean

Check whether the Player has enough Rights

Parameters

\ManiaControl\Players\Player $player
integer|\ManiaControl\Settings\Setting $neededAuthLevel

Returns

boolean

getAdmins()

getAdmins(integer  $authLevel = self::AUTH_LEVEL_MODERATOR) : array<mixed,\ManiaControl\Players\Player>

Get a List of all Admins

Parameters

integer $authLevel

Returns

array<mixed,\ManiaControl\Players\Player>

grantAuthLevel()

grantAuthLevel(\ManiaControl\Players\Player  $player, integer  $authLevel) : boolean

Grant the Auth Level to the Player

Parameters

\ManiaControl\Players\Player $player
integer $authLevel

Returns

boolean

sendNotAllowed()

sendNotAllowed(\ManiaControl\Players\Player  $player) : boolean

Send an Error Message to the Player

Parameters

\ManiaControl\Players\Player $player

Returns

boolean

checkPermission()

checkPermission(\ManiaControl\Players\Player  $player,   $rightName) : boolean

Checks the permission by a right name

Parameters

\ManiaControl\Players\Player $player
$rightName

Returns

boolean

definePermissionLevel()

definePermissionLevel(string  $rightName, integer  $authLevelNeeded) 

Define a Minimum Right Level needed for an Action

Parameters

string $rightName
integer $authLevelNeeded

updateMasterAdmins()

updateMasterAdmins() : boolean

Update MasterAdmins based on Config

Returns

boolean

getPermissionLevelNameArray()

getPermissionLevelNameArray(  $authLevelNeeded) : array<mixed,array>

Get the PermissionLevelNameArray

Parameters

$authLevelNeeded

Returns

array<mixed,array>