[ Index ]

PHP Cross Reference of Joomla 2.5.4 DE

title

Body

[close]

/libraries/joomla/access/ -> access.php (summary)

(no description)

Copyright: Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
License: GNU General Public License version 2 or later; see LICENSE
File Size: 474 lines (13 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

JAccess:: (9 methods):
  clearStatics()
  check()
  checkGroup()
  getGroupPath()
  getAssetRules()
  getGroupsByUser()
  getUsersByGroup()
  getAuthorisedViewLevels()
  getActions()


Class: JAccess  - X-Ref

Class that handles all access authorisation routines.

clearStatics()   X-Ref
Method for clearing static caches.

return: void

check($userId, $action, $asset = null)   X-Ref
Method to check if a user is authorised to perform an action, optionally on an asset.

param: integer  $userId  Id of the user for which to check authorisation.
param: string   $action  The name of the action to authorise.
param: mixed    $asset   Integer asset id or the name of the asset as a string.  Defaults to the global asset node.
return: boolean  True if authorised.

checkGroup($groupId, $action, $asset = null)   X-Ref
Method to check if a group is authorised to perform an action, optionally on an asset.

param: integer  $groupId  The path to the group for which to check authorisation.
param: string   $action   The name of the action to authorise.
param: mixed    $asset    Integer asset id or the name of the asset as a string.  Defaults to the global asset node.
return: boolean  True if authorised.

getGroupPath($groupId)   X-Ref
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).

param: mixed  $groupId  An integer or array of integers representing the identities to check.
return: mixed  True if allowed, false for an explicit deny, null for an implicit deny.

getAssetRules($asset, $recursive = false)   X-Ref
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.

param: mixed    $asset      Integer asset id or the name of the asset as a string.
param: boolean  $recursive  True to return the rules object with inherited rules.
return: JAccessRules   JAccessRules object for the asset.

getGroupsByUser($userId, $recursive = true)   X-Ref
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.

param: integer  $userId     Id of the user for which to get the list of groups.
param: boolean  $recursive  True to include inherited user groups.
return: array    List of user group ids to which the user is mapped.

getUsersByGroup($groupId, $recursive = false)   X-Ref
Method to return a list of user Ids contained in a Group

param: integer  $groupId    The group Id
param: boolean  $recursive  Recursively include all child groups (optional)
return: array

getAuthorisedViewLevels($userId)   X-Ref
Method to return a list of view levels for which the user is authorised.

param: integer  $userId  Id of the user for which to get the list of authorised view levels.
return: array    List of view levels for which the user is authorised.

getActions($component, $section = 'component')   X-Ref
Method to return a list of actions for which permissions can be set given a component and section.

param: string  $component  The component from which to retrieve the actions.
param: string  $section    The name of the section within the component from which to retrieve the actions.
return: array  List of actions available for the given component and section.



Generated: Tue Apr 3 11:40:28 2012 Cross-referenced by PHPXref 0.7.1