function social_core_update_8901 in Open Social 10.1.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_core/social_core.install \social_core_update_8901()
- 10.3.x modules/social_features/social_core/social_core.install \social_core_update_8901()
- 10.0.x modules/social_features/social_core/social_core.install \social_core_update_8901()
- 10.2.x modules/social_features/social_core/social_core.install \social_core_update_8901()
Add the administration theme to authenticated users for batch operations.
File
- modules/
social_features/ social_core/ social_core.install, line 1190 - Install, update and uninstall functions for the social_core module.
Code
function social_core_update_8901() {
$roles = \Drupal::entityQuery('user_role')
->condition('id', [
'authenticated',
], 'IN')
->execute();
$permissions = [
'view the administration theme',
];
foreach ($roles as $role) {
user_role_grant_permissions($role, $permissions);
}
}