Skip to content
Snippets Groups Projects
Commit aba81ab9 authored by Angie Byron's avatar Angie Byron
Browse files

#480660 follow-up by catch: Code style changes and changelog entry.

parent f179a802
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -29,6 +29,8 @@ Drupal 7.0, xxxx-xx-xx (development version)
order can now be customised using the Views module.
* Added additional features to the default install profile, and implemented
a "slimmed down" install profile designed for developers.
* Added an administrator role which is assigned all permisions for
installed modules automatically.
* Image toolkits are now provided by modules (rather than requiring a manual
file copy to the includes directory).
* Added an edit tab to taxonomy term pages.
......
......@@ -254,10 +254,10 @@ function user_admin_settings() {
// Administrative role option.
$form['admin_role'] = array(
'#type' => 'fieldset',
'#title' => t ('Administrator role'),
'#title' => t('Administrator role'),
);
// Don't allow users to set the anonymous or authenticated user roles as the
// Do not allow users to set the anonymous or authenticated user roles as the
// administrator role.
$roles = user_roles();
$roles = array_slice($roles, 2, NULL, TRUE);
......@@ -944,7 +944,7 @@ function user_modules_installed($modules) {
db_insert('role_permission')
->fields(array(
'rid' => $rid,
'permission' => $permission,
'permission' => $permission,
))->execute();
}
}
......
......@@ -221,16 +221,12 @@ function default_profile_tasks(&$task, $url) {
variable_set('user_admin_role', $rid);
// Assign all available permissions to this role.
foreach (module_implements('perm') as $module) {
if ($permissions = module_invoke($module, 'perm')) {
foreach (array_keys($permissions) as $permission) {
db_insert('role_permission')
->fields(array(
'rid' => $rid,
'permission' => $permission,
))->execute();
}
}
foreach (module_invoke_all('perm') as $key => $value) {
db_insert('role_permission')
->fields(array(
'rid' => $rid,
'permission' => $key,
))->execute();
}
// Update the menu router information.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment