Joomla CMS
3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
|
Fonctions membres publiques statiques | |
static | clearStatics () |
static | check ($userId, $action, $assetKey=null, $preload=true) |
static | preload ($assetTypes='components', $reload=false) |
static | checkGroup ($groupId, $action, $assetKey=null, $preload=true) |
static | getAssetRules ($assetKey, $recursive=false, $recursiveParentAsset=true, $preload=true) |
static | getExtensionNameFromAsset ($assetKey) |
static | getAssetType ($assetKey) |
static | getGroupTitle ($groupId) |
static | getGroupsByUser ($userId, $recursive=true) |
static | getUsersByGroup ($groupId, $recursive=false) |
static | getAuthorisedViewLevels ($userId) |
static | getActions ($component, $section='component') |
static | getActionsFromFile ($file, $xpath="/access/section[@name='component']/") |
static | getActionsFromData ($data, $xpath="/access/section[@name='component']/") |
Fonctions membres protégées statiques | |
static | getAssetAncestors ($assetType, $assetId) |
static & | preloadPermissionsParentIdMapping ($assetType) |
static | preloadPermissions ($assetType, $reload=false) |
static | preloadComponents () |
static | getGroupPath ($groupId) |
static | cleanAssetKey ($assetKey=null) |
static | getAssetId ($assetKey) |
static | getAssetName ($assetKey) |
Attributs protégés statiques | |
static | $viewLevels = array() |
static | $assetRules = array() |
static | $assetRulesIdentities = array() |
static | $assetPermissionsById = array() |
static | $assetPermissionsByName = array() |
static | $assetPermissionsParentIdMapping = array() |
static | $preloadedAssetTypes = array() |
static | $identities = array() |
static | $userGroups = array() |
static | $userGroupPaths = array() |
static | $groupsByUser = array() |
static | $preloadedAssets = array() |
static | $rootAssetId = null |
Class that handles all access authorisation routines.
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. |
integer | string | $assetKey | The asset key (asset id or asset name). null fallback to root asset. |
boolean | $preload | Indicates whether preloading should be used. |
Références $action, et $userId.
Référencé par User\authorise(), et User\save().
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. |
integer | string | $assetKey | The asset key (asset id or asset name). null fallback to root asset. |
boolean | $preload | Indicates whether preloading should be used. |
Références $action.
Référencé par UserHelper\checkSuperUserInUsers(), UsergrouplistField\getOptions(), et User\save().
|
staticprotected |
Method to clean the asset key to make sure we always have something.
integer | string | $assetKey | The asset key (asset id or asset name). null fallback to root asset. |
Références null.
|
static |
Method for clearing static caches.
Références null.
Référencé par User\clearAccessRights().
|
static |
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. |
Références $component, $section, et JPATH_ADMINISTRATOR.
Référencé par RulesRule\getFieldActions().
|
static |
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. |
|
static |
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. |
Références $file.
Référencé par ContentHelper\_getActions(), et ContentHelper\getActions().
|
staticprotected |
Method to recursively retrieve the list of parent Asset IDs for a particular Asset.
string | $assetType | The asset type, or the asset name, or the extension of the asset (e.g. 'com_content.article', 'com_menus.menu.2', 'com_contact'). |
integer | $assetId | The numeric asset id. |
|
staticprotected |
Method to get the asset id from the asset key.
integer | string | $assetKey | The asset key (asset id or asset name). |
Références null.
|
staticprotected |
|
static |
Method to return the Rules 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.
integer | string | $assetKey | The asset key (asset id or asset name). null fallback to root asset. |
boolean | $recursive | True to return the rules object with inherited rules. |
boolean | $recursiveParentAsset | True to calculate the rule also based on inherited component/extension rules. |
boolean | $preload | Indicates whether preloading should be used. |
Hashing the collected rules allows us to store only one instance of the Rules object for Assets that have the same exact permissions... it's a great way to save some memory.
Références $asset, $assetId, $db, $hash, $id, $query, JDEBUG, Rules\mergeCollection(), name, et null.
Référencé par User\authorise(), et Content\getDefaultAssetValues().
|
static |
Method to get the asset type from the asset name.
For top level components this returns "components": 'com_content' returns 'components'
For other types: 'com_content.article.1' returns 'com_content.article' 'com_content.category.1' returns 'com_content.category'
integer | string | $assetKey | The asset key (asset id or asset name). |
|
static |
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. |
Références $authorised, $db, $groups, $id, $query, $user, $userId, et elseif.
Référencé par User\getAuthorisedViewLevels().
|
static |
Method to get the extension name from the asset name.
integer | string | $assetKey | The asset key (asset id or asset name). |
|
staticprotected |
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. |
Références $groups.
|
static |
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. |
Références $db, $query, $userId, et ArrayHelper\toInteger().
Référencé par ComponentHelper\filterText(), et User\getAuthorisedGroups().
|
static |
|
static |
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) |
Références $db, $query, et ArrayHelper\toInteger().
|
static |
Method to preload the Rules object for the given asset type.
integer | string | array | $assetTypes | The type or name of the asset (e.g. 'com_content.article', 'com_menus.menu.2'). Also accepts the asset id. An array of asset type or a special 'components' string to load all component assets. |
boolean | $reload | Set to true to reload from database. |
|
staticprotected |
Method to preload the Rules objects for all components.
Note: This will only get the base permissions for the component. e.g. it will get 'com_content', but not 'com_content.article.1' or any more specific asset type rules.
Références $asset, $component, $db, $query, JDEBUG, et null.
|
staticprotected |
Method to retrieve the Asset Rule strings for this particular Asset Type and stores them for later usage in getAssetRules(). Stores 2 arrays: one where the list has the Asset ID as the key and a second one where the Asset Name is the key.
string | $assetType | The asset type, or the asset name, or the extension of the asset (e.g. 'com_content.article', 'com_menus.menu.2', 'com_contact'). |
boolean | $reload | Reload the preloaded assets. |
|
staticprotected |
Method to retrieve the list of Asset IDs and their Parent Asset IDs and store them for later usage in getAssetRules().
string | $assetType | The asset type, or the asset name, or the extension of the asset (e.g. 'com_content.article', 'com_menus.menu.2', 'com_contact'). |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
Référencé par JFormFieldRules\getInput(), FOFFormFieldRules\getInput25(), et FOFFormFieldRules\getInput3x().
|
staticprotected |
|
staticprotected |
|
staticprotected |
Référencé par Rule\__construct(), Rules\__construct(), Rule\allow(), Rules\merge(), Rules\mergeAction(), et Rule\mergeIdentities().
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |