You are here

function content_permissions_perm in Content Construction Kit (CCK) 6.3

Same name and namespace in other branches
  1. 6 modules/content_permissions/content_permissions.module \content_permissions_perm()
  2. 6.2 modules/content_permissions/content_permissions.module \content_permissions_perm()

Implementation of hook_perm().

File

modules/content_permissions/content_permissions.module, line 6

Code

function content_permissions_perm() {
  $perms = array();
  foreach (content_fields() as $field) {
    $perms[] = 'edit ' . $field['field_name'];
    $perms[] = 'view ' . $field['field_name'];
  }
  return $perms;
}