function content_perm

7.x content.module content_perm()
6.x content.module content_perm()
4.x content.module content_perm()
5.x content.module content_perm()

Implementation of hook_perm

We want to create a permission for every content type.

File

modules/content/content.module, line 703

Code

function content_perm() {
  $rtn = array();


  $rtn ["admin_content"] = array(
    "title" => t("Administer Content"),
    "description" => t("The user needs this permission to access the content page at all, in
                      addition to specific permissions listed below for editing
                      different content types."),
  );

  $types = content_get_types();
  foreach ($types as $type => $details) {
    $rtn ["edit_$type" . "_content"] = array(
      "title" => t("Edit") . " " . $details ["title"] . " " . t("content"),
    );
  }

  return $rtn;
}