Provides user permisison functions for the admin
This is the code documentation for the SproutCMS project
Search documentation |
class AdminPermsProvides user permisison functions for the admin
Variables
Functions
public canAccessunknown AdminPerms::canAccess ( mixed $access_flag ); Returns true or false depending on if an access flag is available for this user or not public canAccessSubsiteunknown AdminPerms::canAccessSubsite ( mixed $subsite_id ); Returns true or false depending on if a subsite is available for this user or not public canEditOperatorunknown AdminPerms::canEditOperator ( mixed $operator_id ); Can the currently-logged in operator edit the operator in question? public checkPermissionsTreeunknown 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 controllerAccessunknown 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 controllerAccessMultiunknown 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 filterAdminTilesarray AdminPerms::filterAdminTiles ( array $tiles ); Remove controllers and tiles for which the user doesn't have access public getAccessableGroupsfalse|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 getFirstAccessableunknown 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 getManageOperatorCategoriesarray AdminPerms::getManageOperatorCategories ( ); Return the list of operator categories which the currently-logged in operator can manage public getOperatorsWithAccessarray AdminPerms::getOperatorsWithAccess ( string $access_flag ); Get a list of all operators with a specific access flag public loadAccessFlagsvoid 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 loadSubsitesPermittedunknown 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 |
| Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Wednesday, 5th August, 2026 at 03:31 pm |
|