function social_event_update_8807 in Open Social 10.3.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_event/social_event.install \social_event_update_8807()
- 10.0.x modules/social_features/social_event/social_event.install \social_event_update_8807()
- 10.1.x modules/social_features/social_event/social_event.install \social_event_update_8807()
- 10.2.x modules/social_features/social_event/social_event.install \social_event_update_8807()
Grant CM+ with 'manage event enrollment requests' permission.
File
- modules/
social_features/ social_event/ social_event.install, line 1504 - Install, update and uninstall functions for the social_event module.
Code
function social_event_update_8807() {
$roles = Role::loadMultiple();
/** @var \Drupal\user\Entity\Role $role */
foreach ($roles as $role) {
if ($role
->id() === 'contentmanager' || $role
->id() === 'sitemanager') {
user_role_grant_permissions($role
->id(), [
'manage event enrollment requests',
]);
}
}
}