1 system.module | system_permission() |
Implements hook_permission().
File
- core/
modules/ system/ system.module, line 155 - Configuration system that lets administrators modify the workings of the site.
Code
function system_permission() {
$permissions = array(
'administer modules' => array(
'title' => t('Administer modules'),
),
'administer site configuration' => array(
'title' => t('Administer site configuration'),
'restrict access' => TRUE,
'warning' => t('Provides access to a variety of settings/functionality that should generally be restricted to site administrators.'),
),
'administer themes' => array(
'title' => t('Administer themes'),
),
'administer software updates' => array(
'title' => t('Administer software updates'),
'restrict access' => TRUE,
'warning' => t('Allows running site updates (update.php) for Backdrop projects.'),
),
);
// If backups are not configured, do not show related permission.
if (backup_get_backup_directory()) {
$permissions += array(
'restore site backups' => array(
'title' => t('Restore site backups'),
'restrict access' => TRUE,
'warning' => t('Allows restoring the configuration and database from backups (restore.php).'),
),
);
}
$permissions += array(
'access administration pages' => array(
'title' => t('Use the administration pages'),
),
'access site in maintenance mode' => array(
'title' => t('Use the site in maintenance mode'),
),
'view the administration theme' => array(
'title' => t('View the administration theme'),
'description' => config_get('system.core', 'admin_theme') ? '' : t('This is only used when the site is configured to use a separate administration theme on the <a href="@appearance-url">Appearance</a> page.', array('@appearance-url' => url('admin/appearance'))),
),
'access site reports' => array(
'title' => t('View site reports'),
),
'flush caches' => array(
'title' => t('Flush caches'),
'description' => t('Provides access to manually flush caches.'),
),
);
return $permissions;
}