function social_core_update_8002 in Open Social 8.6
Same name and namespace in other branches
- 8.9 modules/social_features/social_core/social_core.install \social_core_update_8002()
- 8 modules/social_features/social_core/social_core.install \social_core_update_8002()
- 8.2 modules/social_features/social_core/social_core.install \social_core_update_8002()
- 8.3 modules/social_features/social_core/social_core.install \social_core_update_8002()
- 8.4 modules/social_features/social_core/social_core.install \social_core_update_8002()
- 8.5 modules/social_features/social_core/social_core.install \social_core_update_8002()
- 8.7 modules/social_features/social_core/social_core.install \social_core_update_8002()
- 8.8 modules/social_features/social_core/social_core.install \social_core_update_8002()
- 10.3.x modules/social_features/social_core/social_core.install \social_core_update_8002()
- 10.0.x modules/social_features/social_core/social_core.install \social_core_update_8002()
- 10.1.x modules/social_features/social_core/social_core.install \social_core_update_8002()
- 10.2.x modules/social_features/social_core/social_core.install \social_core_update_8002()
Enable full_html format for contentmanager and sitemanager roles.
File
- modules/
social_features/ social_core/ social_core.install, line 259 - Install, update and uninstall functions for the social_comment module.
Code
function social_core_update_8002() {
$roles = Role::loadMultiple();
$permissions = [
'use text format full_html',
];
/** @var \Drupal\user\Entity\Role $role */
foreach ($roles as $role) {
if ($role
->id() === 'contentmanager' || $role
->id() === 'sitemanager') {
user_role_grant_permissions($role
->id(), $permissions);
}
}
}