SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class AdminPerms

Provides user permisison functions for the admin

Variables

NameVisibilityDescription
$access_flags (static) 
$subsites_permitted (static) 

Functions

NameVisibilityDescription
canAccesspublic (static)Returns true or false depending on if an access flag is available for this user or not
canAccessSubsitepublic (static)Returns true or false depending on if a subsite is available for this user or not
canEditOperatorpublic (static)Can the currently-logged in operator edit the operator in question?
checkPermissionsTreepublic (static)Checks whether the currently logged in operator can access the specified item.
controllerAccesspublic (static)Returns true or false depending on if an access flag is available for this user or not
controllerAccessMultipublic (static)For a given list of controllers, return a list of controllers which the current user can actually access.
filterAdminTilespublic (static)Remove controllers and tiles for which the user doesn't have access
getAccessableGroupspublic (static)Returns a list of groups (operator categories) which can access a specific page.
getFirstAccessablepublic (static)Get the name of the first controller the user has access to.
getManageOperatorCategoriespublic (static)Return the list of operator categories which the currently-logged in operator can manage
getOperatorsWithAccesspublic (static)Get a list of all operators with a specific access flag
loadAccessFlagspublic (static)Gets all 'access' flags for this user.
loadSubsitesPermittedpublic (static)Gets all permitted subsite IDs for this user.

public canAccess

unknown AdminPerms::canAccess ( mixed $access_flag );

Returns true or false depending on if an access flag is available for this user or not

public canAccessSubsite

unknown AdminPerms::canAccessSubsite ( mixed $subsite_id );

Returns true or false depending on if a subsite is available for this user or not

public canEditOperator

unknown AdminPerms::canEditOperator ( mixed $operator_id );

Can the currently-logged in operator edit the operator in question?

public checkPermissionsTree

unknown AdminPerms::checkPermissionsTree ( string $table , int $id );

Checks whether the currently logged in operator can access the specified item.
This method should be used for tree-based tables, like the 'pages' table,
which may inherit their permissions from the parent record.

public controllerAccess

unknown AdminPerms::controllerAccess ( string $controller , string $access_flag );

Returns true or false depending on if an access flag is available for this user or not

public controllerAccessMulti

unknown AdminPerms::controllerAccessMulti ( array $controllers );

For a given list of controllers, return a list of controllers which the current user can actually access.
This controls which tabs show in the navigation.
It checks for the 'contents' access flag.

public filterAdminTiles

array AdminPerms::filterAdminTiles ( array $tiles );

Remove controllers and tiles for which the user doesn't have access

public getAccessableGroups

false|array AdminPerms::getAccessableGroups ( string $table , int $id );

Returns a list of groups (operator categories) which can access a specific page.

Each page can either specify permissions, or inherit permissions from it's parent page.

public getFirstAccessable

unknown AdminPerms::getFirstAccessable ( );

Get the name of the first controller the user has access to.
For most users, this will be 'pages', but it might be something else.

public getManageOperatorCategories

array AdminPerms::getManageOperatorCategories ( );

Return the list of operator categories which the currently-logged in operator can manage

public getOperatorsWithAccess

array AdminPerms::getOperatorsWithAccess ( string $access_flag );

Get a list of all operators with a specific access flag

public loadAccessFlags

void AdminPerms::loadAccessFlags ( );

Gets all 'access' flags for this user.
Access flags are specified per operator-group.
This function will return the values for all of the defined access flags,
   returning the greatest-permission flag available for the user.
Will get data for the currently logged in user

public loadSubsitesPermitted

unknown AdminPerms::loadSubsitesPermitted ( );

Gets all permitted subsite IDs for this user.
Subsite permissions are specified per operator-group.
This function will return an array of subsite IDs.
Will get data for the currently logged in user