Authorization

Contracts

AuthorizedUserRepositoryContract

service to get current authorized user

Namespace

Plenty\Modules\Authorization\Contracts

Methods

public getCurrentAuthorizedUser():AuthorizedUser

Models

AuthorizedUser

The current authorized user

Namespace

Plenty\Modules\Authorization\Models

Properties

Type Name Description
string realName The real name of the authorized user
string lang The back end language used by the authorized user
string isSupportUser Shows whether the authorized user is a support user
User user Further information about the user's class, roles and rights
string oauthAccessTokensId The access token for OAUTH authentication

Methods

public toArray()

Returns this model as an array.

Role

The Role authentication model

Namespace

Plenty\Modules\Authorization\Models

Properties

Type Name Description
int id role id
string name role name
bool holdParents hold parents if there is a new child
bool hidden hidden status for internal roles
array users
array permissions

Methods

public toArray()

Returns this model as an array.

Permission

The authentication Permission (REST) model

Namespace

Plenty\Modules\Authorization\Models

Properties

Type Name Description
int id permission id
string permissionKey permission key
array roles

Methods

public toArray()

Returns this model as an array.

Exception

AuthorizationException

Class AuthorizationException

Namespace

Plenty\Modules\Authorization\Exception

Methods

public __construct(string $message = "", int $code, Exception
 $previous = null):void
Parameters
string $message The exception message
int $code The exception code
Exception $previous
public missingPermissions():Collection
public addMissingPermission(string $permissionKey):void
Parameters
string $permissionKey The permission key

Services

AuthHelper

Service to process unguarded php code

Namespace

Plenty\Modules\Authorization\Services

Methods

public processUnguarded(callable $callable):void
Parameters
callable $callable