You are here

function _environment_readonly_get_perms in Environment 7

Get permissions.

Return value

array Permissions.

2 calls to _environment_readonly_get_perms()
environment_readonly_admin_settings in modules/environment_readonly/environment_readonly.admin.inc
Admin settings form.
_environment_readonly_get_action_perms in modules/environment_readonly/environment_readonly.module
Get action permissions.

File

modules/environment_readonly/environment_readonly.module, line 154
Code for the Environment Readonly module.

Code

function _environment_readonly_get_perms() {
  $modules = array();
  foreach (module_implements('permission') as $module) {
    $modules[] = $module;
  }
  $permissions = array();
  foreach ($modules as $module) {
    if ($module_perms = module_invoke($module, 'permission')) {
      foreach ($module_perms as $perm => $perm_item) {
        $permissions[$perm] = $perm;
      }
    }
  }
  return $permissions;
}