JAccess
Class that handles all access authorisation routines.
Located in /libraries/joomla/access/access.php (line 21)
JAccess (Subpackage Access)
static boolean|array
getActionsFromData
(string|SimpleXMLElement $data, [string $xpath = "/access/section[@name='component']/"])
static boolean|array
getActionsFromFile
(string $file, [string $xpath = "/access/section[@name='component']/"])
array
$assetRules
= array() (line 37)
Array of rules for the asset
array
$groupsByUser
= array() (line 61)
Array of cached groups by user.
array
$userGroupPaths
= array() (line 53)
Array of user group paths.
array
$userGroups
= array() (line 45)
Array of user groups.
array
$viewLevels
= array() (line 29)
Array of view levels
Method to check if a user is authorised to perform an action, optionally on an asset.
- integer $userId: Id of the user for which to check authorisation.
- string $action: The name of the action to authorise.
- mixed $asset: Integer asset id or the name of the asset as a string. Defaults to the global asset node.
Method to check if a group is authorised to perform an action, optionally on an asset.
- integer $groupId: The path to the group for which to check authorisation.
- string $action: The name of the action to authorise.
- mixed $asset: Integer asset id or the name of the asset as a string. Defaults to the global asset node.
Method to return a list of actions for which permissions can be set given a component and section.
- string $component: The component from which to retrieve the actions.
- string $section: The name of the section within the component from which to retrieve the actions.
Method to return a list of actions from a string or from an xml for which permissions can be set.
- string|SimpleXMLElement $data: The XML string or an XML element.
- string $xpath: An optional xpath to search for the fields.
Method to return a list of actions from a file for which permissions can be set.
- string $file: The path to the XML file.
- string $xpath: An optional xpath to search for the fields.
Method to return the JAccessRules object for an asset. The returned object can optionally hold only the rules explicitly set for the asset or the summation of all inherited rules from parent assets and explicit rules.
- mixed $asset: Integer asset id or the name of the asset as a string.
- boolean $recursive: True to return the rules object with inherited rules.
Method to return a list of view levels for which the user is authorised.
- integer $userId: Id of the user for which to get the list of authorised view levels.
Gets the parent groups that a leaf group belongs to in its branch back to the root of the tree (including the leaf group id).
- mixed $groupId: An integer or array of integers representing the identities to check.
Method to return a list of user groups mapped to a user. The returned list can optionally hold only the groups explicitly mapped to the user or all groups both explicitly mapped and inherited by the user.
- integer $userId: Id of the user for which to get the list of groups.
- boolean $recursive: True to include inherited user groups.
Method to return a list of user Ids contained in a Group
- integer $groupId: The group Id
- boolean $recursive: Recursively include all child groups (optional)
JAccess (Subpackage Access)
static