function _social_post_photo_set_permissions in Open Social 10.2.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_post/modules/social_post_photo/social_post_photo.install \_social_post_photo_set_permissions()
- 8.8 modules/social_features/social_post/modules/social_post_photo/social_post_photo.install \_social_post_photo_set_permissions()
- 10.3.x modules/social_features/social_post/modules/social_post_photo/social_post_photo.install \_social_post_photo_set_permissions()
- 10.0.x modules/social_features/social_post/modules/social_post_photo/social_post_photo.install \_social_post_photo_set_permissions()
- 10.1.x modules/social_features/social_post/modules/social_post_photo/social_post_photo.install \_social_post_photo_set_permissions()
Function to set permissions.
1 call to _social_post_photo_set_permissions()
- social_post_photo_install in modules/
social_features/ social_post/ modules/ social_post_photo/ social_post_photo.install - Install hook for Social Post Photo.
File
- modules/
social_features/ social_post/ modules/ social_post_photo/ social_post_photo.install, line 25 - The Social post photo installation.
Code
function _social_post_photo_set_permissions() {
$roles = \Drupal::entityQuery('user_role')
->condition('id', 'administrator', '<>')
->execute();
foreach ($roles as $role) {
$permissions = _social_post_photo_get_permissions($role);
user_role_grant_permissions($role, $permissions);
}
}