function hook_perm
Search API
This hook defines available permissions for a module. These perms are used with hook_menu() and the function user_has_permission()
They are defined in the form of an associative array.
Return array should look like this: $rtn["machine_name_of_perm"] = array( "title" => "Human readable title for perm", "description" => "Optional longer description of what perm allows.", );
See also
14 functions implement hook_perm()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- admin_perm in modules/
admin/ admin.module - advise_perm in modules/
advise/ advise.module - Implementation of hook_perm
- announcements_perm in modules/
announcements/ announcements.module - Implementation of hook_perm
- batch_perm in modules/
batch/ batch.module - Implementation of hook_perm
- blank_degrees_perm in modules/
blank_degrees/ blank_degrees.module
File
- includes/
hook.api.php, line 554 - Lists all available hooks within FlightPath's core code.
Code
function hook_perm() {
// An example from system.module:
$perms = array(
"access_logged_in_content" => array(
"title" => t("Access logged-in content"),
"description" => t("This should be given to all authenticated users. It simply means
the user is allowed to view the logged-in area of FlightPath."),
),
"administer_modules" => array(
"title" => t("Administer modules"),
"description" => t("This will allow a user to install, enable, disable, and uninstall modules."),
),
"run_cron" => array(
"title" => t("Run Cron"),
"description" => t("The user may run hook_cron functions at will. Causes a new menu link to appear
on the admin page."),
),
"de_can_administer_system_settings" => array(
"title" => t("Can administer system settings"),
"description" => t("This allows the user to edit any of the FlightPath
system settings."),
),
"view_fpm_debug" => array(
"title" => t("View debug output from the fpm() function"),
"description" => t("The user may view debug output from the fpm() function.
Useful for developers."),
),
);
return $perms;
}