CKFinder 3 – PHP Connector Documentation
Acl Class Reference
Inheritance diagram for Acl:
AclInterface

Public Member Functions

 __construct (RoleContextInterface $roleContext)
 
 setRules (array $aclConfigNodes)
 
 isAllowed ($resourceType, $folderPath, $permission, $role=null)
 
 getComputedMask ($resourceType, $folderPath, $role=null)
 
- Public Member Functions inherited from AclInterface
 allow ($resourceType, $folderPath, $permission, $role)
 
 disallow ($resourceType, $folderPath, $permission, $role)
 
 isAllowed ($resourceType, $folderPath, $permission, $role=null)
 
 getComputedMask ($resourceType, $folderPath, $role=null)
 

Protected Attributes

 $rules = []
 
 $roleContext
 
 $cachedResults = []
 

Detailed Description

The Acl class.

Constructor & Destructor Documentation

◆ __construct()

__construct ( RoleContextInterface  $roleContext)

Constructor.

Member Function Documentation

◆ getComputedMask()

getComputedMask (   $resourceType,
  $folderPath,
  $role = null 
)

Returns a computed mask.

Parameters
string$resourceType
string$folderPath
null | string$role
Returns
int

Implements AclInterface.

◆ isAllowed()

isAllowed (   $resourceType,
  $folderPath,
  $permission,
  $role = null 
)

Checks if a given role has a permission.

Parameters
string$resourceType
string$folderPath
int$permission
null | string$role
Returns
bool

Implements AclInterface.

◆ setRules()

setRules ( array  $aclConfigNodes)

Sets rules for Access Control Lists using configuration nodes.

It is assumed that Acl configuration nodes used here have the following form:

array(
'role' => 'foo',
'resourceType' => 'Images',
'folder' => '/bar',
// Permissions
'FOLDER_VIEW' => true,
'FOLDER_CREATE' => true,
'FOLDER_RENAME' => true,
'FOLDER_DELETE' => true,
'FILE_VIEW' => true,
'FILE_CREATE' => true,
'FILE_RENAME' => true,
'FILE_DELETE' => true
)

If any permission is missing, it is inherited from the parent folder.

Parameters
array$aclConfigNodesAccess Control Lists configuration nodes

The documentation for this class was generated from the following file: