Documentation

UserPerms
in package
implements UserPermsInterface

Default implementation of user permissions for when the users module is not installed.

Methods here will however use the installed service, if available.

Table of Contents

Interfaces

UserPermsInterface
Provides user permission functions for the front-end

Methods

checkPermissionsTree()  : bool
Checks whether the currently logged in user can access the specified item.
configure()  : void
Configure the service.
getAccessableGroups()  : array<string|int, mixed>
Returns a list of groups which can access a specific page.
getAccessDenied()  : BaseView|null
Return a message which is output to a user when access is denied
getAllCategories()  : array<string|int, mixed>
Gets a list of all of the user categories

Methods

checkPermissionsTree()

Checks whether the currently logged in user can access the specified item.

public static checkPermissionsTree(string $table, int $id) : bool
Parameters
$table : string

The table name of the item to check

$id : int

The id of the record to check

Tags
inheritdoc
Return values
bool —

True if the user has access, false otherwise

configure()

Configure the service.

public static configure(array<string|int, mixed> $config) : void
Parameters
$config : array<string|int, mixed>
Tags
inheritdoc

getAccessableGroups()

Returns a list of groups which can access a specific page.

public static getAccessableGroups(string $table, int $id) : array<string|int, mixed>
Parameters
$table : string

The table to get permissions for

$id : int

The ID of the record to get permissions for

Tags
inheritdoc
Return values
array<string|int, mixed> —

Each element is a category id

getAccessDenied()

Return a message which is output to a user when access is denied

public static getAccessDenied() : BaseView|null
Tags
inheritdoc
Return values
BaseView|null

getAllCategories()

Gets a list of all of the user categories

public static getAllCategories() : array<string|int, mixed>
Tags
inheritdoc
Return values
array<string|int, mixed> —

[id => name]

On this page

Search results