function _field_permissions_permission in Field Permissions 7
Implements hook_permission().
1 call to _field_permissions_permission()
- field_permissions_permission in ./
field_permissions.module - Implementation of hook_permission().
File
- ./
field_permissions.admin.inc, line 97 - Administrative interface for the Field Permissions module.
Code
function _field_permissions_permission() {
$perms = array(
'administer field permissions' => array(
'title' => t('Administer field permissions'),
'description' => t('Manage field permissions and field permissions settings.'),
'restrict access' => TRUE,
),
'access private fields' => array(
'title' => t("Access other users' private fields"),
'description' => t('View and edit the stored values of all private fields.'),
'restrict access' => TRUE,
),
);
foreach (field_info_fields() as $field) {
if (isset($field['field_permissions']['type']) && $field['field_permissions']['type'] == FIELD_PERMISSIONS_CUSTOM) {
$perms += field_permissions_list_field_permissions($field);
}
}
return $perms;
}