You are here

function hook_oa_access_permission in Open Atrium Core 7.2

Define an Open Atrium permission that can be assigned to a Group or Team.

This hook can supply permissions that the module defines, so that they can be selected on the admin page and used to grant or restrict access to certain actions the module performs.

Return value

array An associative array whose keys are permission names and values are associative arrays containing the following keys:


      'type' => OA_ACCESS_GROUP_PERMISSION | OA_ACCESS_TEAM_PERMISSION,
    

See also

hook_oa_access_permission_alter()

oa_access_initialize_permissions()

Related topics

2 functions implement hook_oa_access_permission()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

oa_access_test_all_oa_access_permission in modules/oa_access/tests/oa_access_test_all/oa_access_test_all.module
Implements hook_oa_access_permission().
oa_access_test_oa_access_permission in modules/oa_access/tests/oa_access_test/oa_access_test.module
Implements hook_oa_access_permission().
1 invocation of hook_oa_access_permission()
oa_access_get_permissions in modules/oa_access/oa_access.module
Get all permissions defined by implementing modules.

File

modules/oa_access/oa_access.api.php, line 46
Contains documentation about the Open Atrium Access module's hooks.

Code

function hook_oa_access_permission() {
  return array(
    'do something awesome' => array(
      'title' => t('Do something awesome'),
      'description' => t('Be careful who give this permission to, because soon everyone might want it!'),
    ),
  );
}