rebuildContentPermissions()
setNodeDataManually()
_adjustBasePermissionAllows()
_buildNodeTreePermissions()
_forceNodeWideResetOverride()
_getNodeModel()
_getNodeWideEntries()
_getUserGroupNodeEntries()
_getUserNodeEntries()
_nodeSetup()
$_globalPerms
$_nodePermissionEntries
$_nodeTree
$_nodeTypes
$_nodesInitialized
$_permissionModel
Handles building content permissions for nodes.
Any type of node permission may be applied to any node. However, when calculated, only the known permissions for the specified node type are used. For example, gallery permissions could be applied to a forum, causing those permissions to be inherited to any child galleries. However, when compiled, the forum only has forum permissions.
package | XenForo_Permissions |
---|
rebuildContentPermissions(\XenForo_Model_Permission $permissionModel, array $userGroupIds, integer $userId, array $permissionsGrouped, array $globalPerms) : array
array
List of user groups for the collection
integer
User ID for the collection, if there are custom permissions
array
List of all valid permissions, grouped
array
The global permissions that apply to this combination
array
setNodeDataManually(array $nodeTypes, array $nodeTree, array $nodePermissionEntries)
Generally only needed for testing.
array
array
array
_adjustBasePermissionAllows(array $basePermissions) : array
This allows them to be revoked.
array
array
Adjusted base perms_buildNodeTreePermissions(integer $userId, array $userGroupIds, array $basePermissions, array $permissionsGrouped, integer $parentId) : array
Note that nodes will have permissions for all node types, but the final permissions for a node only include that node's permissions.
integer
array
array
Base permissions, coming from global or parent; [group][permission] => allow/unset/etc
array
List of all valid permissions, grouped
integer
ID of the parent node.
array
Final permissions (true/false), format: [node id][permission] => value_forceNodeWideResetOverride(array $nodeWideEntries, array $nodePermissions) : array
This is used to cause reset to take priority over content allow from a parent, but not content allow from this node.
array
array
array
Updated node permissions_getNodeWideEntries($nodeId) : array
array
_getUserGroupNodeEntries(integer $nodeId, array $userGroupIds) : array
integer
array
array
_getUserNodeEntries($nodeId, $userId) : array
array
_nodeSetup()
Only runs if not initialized.
$_globalPerms : array
These permissions can be manipulated if necessary and the global permissions will actually be modified.
$_nodePermissionEntries : array
$_nodeTree : array
This data is traversed to build permissions.
$_nodeTypes : array
$_nodesInitialized : boolean
Many calls to rebuildContentPermissions() may happen on one object.