PermissionsUtil Class Reference

Static Public Member Functions

static getAllModulePermissionsDataByPermitable (Permitable $permitable)
static resolveExplicitOrInheritedPermission ($permissions, $matchingPermission)
static getActualPermissionDataForReadByModuleNameForCurrentUser ($moduleClassName)

Static Protected Member Functions

static resolveActualPermission ($permissions, $matchingPermission)
static resolvePermissionForData ($permission)
static getPermissions ()

Detailed Description

Helper class for Permissions.

Definition at line 40 of file PermissionsUtil.php.


Member Function Documentation

static getAllModulePermissionsDataByPermitable ( Permitable permitable  )  [static]
Parameters:
Permitable $permitable
Returns:
array of all module permissions data Example of a return just for the accounts module. Normally all the applicable modules permissions would be returned in the array.
            <?php
                $compareData = array(
                    'AccountsModule' => array(
                        'CREATE' => array(
                            'explicit'    => null,
                            'inherited'   => null,
                        ),
                        'CHANGE_OWNER' => array(
                            'explicit'    => null,
                            'inherited'   => null,
                        ),
                        'CHANGE_PERMISSIONS' => array(
                            'explicit'    => null,
                            'inherited'   => null,
                        ),
                        'DELETE' => array(
                            'explicit'    => null,
                            'inherited'   => null,
                        ),
                        'READ' => array(
                            'explicit'    => null,
                            'inherited'   => null,
                        ),
                        'WRITE' => array(
                            'explicit'    => null,
                            'inherited'   => null,
                        ),
                    ),
                );
            ?>

Definition at line 81 of file PermissionsUtil.php.

static resolveExplicitOrInheritedPermission ( permissions,
matchingPermission 
) [static]

Public for testing purposes

Definition at line 129 of file PermissionsUtil.php.

static getActualPermissionDataForReadByModuleNameForCurrentUser ( moduleClassName  )  [static]

Given a moduleClassName, what is the actual read permission? Permission::DENY, Permission::ALLOW, or Permission::NONE?

Definition at line 189 of file PermissionsUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Wed Mar 29 07:10:29 2017