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
Extending this class<?php
/**
* New class description goes here
*
* @author Your Name, 2026-08-16
**/
class NewClassName extends AdminPerms {
/**
* 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 function controllerAccessMulti (array $controllers) {
// Method code goes here
}
/**
* 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 function getFirstAccessable () {
// Method code goes here
}
/**
* Remove controllers and tiles for which the user doesn't have access
**/
public function filterAdminTiles (array $tiles) {
// Method code goes here
}
/**
* Return the list of operator categories which the currently-logged in operator can manage
**/
public function getManageOperatorCategories () {
// Method code goes here
}
/**
* Can the currently-logged in operator edit the operator in question?
**/
public function canEditOperator ($operator_id) {
// Method code goes here
}
/**
* Returns true or false depending on if a subsite is available for this user or not
**/
public function canAccessSubsite ($subsite_id) {
// Method code goes here
}
/**
* Get a list of all operators with a specific access flag
**/
public function getOperatorsWithAccess (string $access_flag) {
// Method code goes here
}
/**
* Returns true or false depending on if an access flag is available for this user or not
**/
public function controllerAccess (string $controller, string $access_flag) {
// Method code goes here
}
/**
* Returns true or false depending on if an access flag is available for this user or not
**/
public function canAccess ($access_flag) {
// Method code goes here
}
/**
* 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
**/
public function loadSubsitesPermitted () {
// Method code goes here
}
/**
* 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 function checkPermissionsTree (string $table, int $id) {
// Method code goes here
}
/**
* 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 function getAccessableGroups (string $table, int $id) {
// Method code goes here
}
/**
* 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 function loadAccessFlags () {
// Method code goes here
}
}
?>
|
| 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 |
|