class CRM_Core_Permission_Joomla extends CRM_Core_Permission_Base

Properties

$permissions from CRM_Core_Permission_Base

Methods

NULL|string
translatePermission(string $perm, string $nativePrefix, array $map)

Translate permission.

string
getPermission()

Get the current permission of this user.

string
whereClause(int $type, array $tables, array $whereTables)

Get the permissioned where clause for the user.

string
getPermissionedStaticGroupClause(int $type, array $tables, array $whereTables)

Get the permissioned where clause for the user when trying to see groups.

array
group(string $groupType = NULL, bool $excludeHidden = TRUE)

Get all groups from database, filtered by permissions for this user

string
groupClause(int $type, array $tables, array $whereTables)

Get group clause for this user.

check(string $str)

Given a permission string, check for access requirements

bool
checkGroupRole(array $array)

Given a roles array, check for access requirements

permissionEmails(string $permissionName)

Get all the contact emails for users that have a specific permission.

roleEmails(string $roleName)

Get all the contact emails for users that have a specific role.

bool
isModulePermissionSupported()

Determine whether the permission store allows us to store a list of permissions generated dynamically (eg by hook_civicrm_permissions.)

upgradePermissions(array $permissions)

No description

static array
getModulePermissions($module)

Get the permissions defined in the hook_civicrm_permission implementation of the given module.

array
getAllModulePermissions(bool $descriptions = FALSE)

Get the permissions defined in the hook_civicrm_permission implementation in all enabled CiviCRM module extensions.

ALWAYS_DENY_PERMISSION|ALWAYS_ALLOW_PERMISSION|array(0
translateJoomlaPermission($perm)

No description

Details

NULL|string translatePermission(string $perm, string $nativePrefix, array $map)

Translate permission.

Parameters

string $perm Permission string e.g "administer CiviCRM", "cms:access user record", "Drupal:administer content", "Joomla:action:com_asset"
string $nativePrefix
array $map Array($portableName => $nativeName).

Return Value

NULL|string a permission name

string getPermission()

Get the current permission of this user.

Return Value

string the permission of the user (edit or view or null)

string whereClause(int $type, array $tables, array $whereTables)

Get the permissioned where clause for the user.

Parameters

int $type The type of permission needed.
array $tables (reference ) add the tables that are needed for the select clause.
array $whereTables (reference ) add the tables that are needed for the where clause.

Return Value

string the group where clause for this user

string getPermissionedStaticGroupClause(int $type, array $tables, array $whereTables)

Get the permissioned where clause for the user when trying to see groups.

Parameters

int $type The type of permission needed.
array $tables (reference ) add the tables that are needed for the select clause.
array $whereTables (reference ) add the tables that are needed for the where clause.

Return Value

string the group where clause for this user

array group(string $groupType = NULL, bool $excludeHidden = TRUE)

Get all groups from database, filtered by permissions for this user

Parameters

string $groupType Type of group(Access/Mailing).
bool $excludeHidden exclude hidden groups.

Return Value

array array reference of all groups.

string groupClause(int $type, array $tables, array $whereTables)

Get group clause for this user.

Parameters

int $type The type of permission needed.
array $tables (reference ) add the tables that are needed for the select clause.
array $whereTables (reference ) add the tables that are needed for the where clause.

Return Value

string the group where clause for this user

at line 49
check(string $str)

Given a permission string, check for access requirements

Parameters

string $str The permission to check.

at line 134
bool checkGroupRole(array $array)

Given a roles array, check for access requirements

Parameters

array $array The roles to check.

Return Value

bool true if yes, else false

permissionEmails(string $permissionName)

Get all the contact emails for users that have a specific permission.

Parameters

string $permissionName Name of the permission we are interested in.

roleEmails(string $roleName)

Get all the contact emails for users that have a specific role.

Parameters

string $roleName Name of the role we are interested in.

at line 93
bool isModulePermissionSupported()

Determine whether the permission store allows us to store a list of permissions generated dynamically (eg by hook_civicrm_permissions.)

Return Value

bool

at line 141
upgradePermissions(array $permissions)

Parameters

array $permissions Same format as CRM_Core_Permission::getCorePermissions().

static array getModulePermissions($module)

Get the permissions defined in the hook_civicrm_permission implementation of the given module.

Note: At time of writing, this is only used with native extension-modules, so there's one, predictable calling convention (regardless of CMS).

Parameters

$module

Return Value

array Array of permissions, in the same format as CRM_Core_Permission::getCorePermissions().

See also

CRM_Core_Permission::getCorePermissions

array getAllModulePermissions(bool $descriptions = FALSE)

Get the permissions defined in the hook_civicrm_permission implementation in all enabled CiviCRM module extensions.

Parameters

bool $descriptions

Return Value

array Array of permissions, in the same format as CRM_Core_Permission::getCorePermissions().

at line 103
ALWAYS_DENY_PERMISSION|ALWAYS_ALLOW_PERMISSION|array(0 translateJoomlaPermission($perm)

Parameters

$perm

Return Value

ALWAYS_DENY_PERMISSION|ALWAYS_ALLOW_PERMISSION|array(0 => $joomlaAction, 1 => $joomlaAsset)