Documentation

PermissionService
in package
implements PermissionServiceInterface

Table of Contents

Interfaces

PermissionServiceInterface

Properties

$permissions  : mixed

Methods

__construct()  : mixed
PermissionService constructor.
canCreate()  : bool
Checks if the current user can create.
canOperate()  : bool
Checks if the current user can operate.
canRead()  : bool
Checks if the current user can read.
canRemove()  : bool
Checks if the current user can remove.
canSearch()  : bool
Checks if the current user can search.
canUpdate()  : bool
Checks if the current user can update.
hasPermission()  : bool
Checks if the current user has a given permission.
isAdmin()  : bool
Checks if the current user is an admin.
isSuperAdmin()  : bool
Checks if the current user is a super admin.

Properties

Methods

canCreate()

Checks if the current user can create.

public canCreate() : bool
Return values
bool

True if the user can create, false otherwise.

canOperate()

Checks if the current user can operate.

public canOperate() : bool
Return values
bool

True if the user can operate, false otherwise.

canRead()

Checks if the current user can read.

public canRead() : bool
Return values
bool

True if the user can read, false otherwise.

canRemove()

Checks if the current user can remove.

public canRemove() : bool
Return values
bool

True if the user can remove, false otherwise.

canSearch()

Checks if the current user can search.

public canSearch() : bool
Return values
bool

True if the user can search, false otherwise.

canUpdate()

Checks if the current user can update.

public canUpdate() : bool
Return values
bool

True if the user can update, false otherwise.

hasPermission()

Checks if the current user has a given permission.

public hasPermission(int $permission) : bool
Parameters
$permission : int

The permission to check.

Return values
bool

True if the user has the permission, false otherwise.

isAdmin()

Checks if the current user is an admin.

public isAdmin() : bool
Return values
bool

True if the user is an admin, false otherwise.

isSuperAdmin()

Checks if the current user is a super admin.

public isSuperAdmin() : bool
Return values
bool

True if the user is a super admin, false otherwise.


        
On this page

Search results