Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Features exports permissions like so below. Do we need to have feature module enabled to use this?
Can we set some sane defaults with the 'administrator, creator, editor paradigm?
/**
* Helper to implementation of hook_user_default_permissions().
*/
function _topmodo_user_default_permissions() {
$permissions = array();
// Exported permission: Use PHP input for field settings (dangerous - grant with care)
$permissions[] = array(
'name' => 'Use PHP input for field settings (dangerous - grant with care)',
'roles' => array(),
);
// Exported permission: access administration menu
$permissions[] = array(
'name' => 'access administration menu',
'roles' => array(),
);
// Exported permission: access administration pages
$permissions[] = array(
'name' => 'access administration pages',
'roles' => array(),
);
// Exported permission: access comments
$permissions[] = array(
'name' => 'access comments',
'roles' => array(
'0' => 'authenticated user',
),
);
// Exported permission: access content
$permissions[] = array(
'name' => 'access content',
'roles' => array(
'0' => 'anonymous user',
'1' => 'authenticated user',
),
);