You are here

function config_perms_perms in Custom Permissions 6.2

Same name and namespace in other branches
  1. 7.2 config_perms.module \config_perms_perms()

Load all permissions

3 calls to config_perms_perms()
config_perms_admin_form in ./config_perms.admin.inc
Administration form
config_perms_menu_alter in ./config_perms.module
Implementation of hook_menu_alter().
config_perms_perm in ./config_perms.module

File

./config_perms.module, line 17
Adds more granular permissions for items under 'administer site configuration'.

Code

function config_perms_perms($machine_name = NULL) {

  // Load current perms
  $perms = cache_get('config_perms');

  // Rebuild if not there
  if (!$perms) {
    config_perms_cache_rebuild();
    $perms = cache_get('config_perms');
  }
  return $machine_name ? $perms->data[$machine_name] : $perms->data;
}