function _social_mentions_get_permissions in Open Social 8.2
Same name and namespace in other branches
- 8.9 modules/social_features/social_mentions/social_mentions.install \_social_mentions_get_permissions()
- 8 modules/social_features/social_mentions/social_mentions.install \_social_mentions_get_permissions()
- 8.3 modules/social_features/social_mentions/social_mentions.install \_social_mentions_get_permissions()
- 8.4 modules/social_features/social_mentions/social_mentions.install \_social_mentions_get_permissions()
- 8.5 modules/social_features/social_mentions/social_mentions.install \_social_mentions_get_permissions()
- 8.6 modules/social_features/social_mentions/social_mentions.install \_social_mentions_get_permissions()
- 8.7 modules/social_features/social_mentions/social_mentions.install \_social_mentions_get_permissions()
- 8.8 modules/social_features/social_mentions/social_mentions.install \_social_mentions_get_permissions()
- 10.3.x modules/social_features/social_mentions/social_mentions.install \_social_mentions_get_permissions()
- 10.0.x modules/social_features/social_mentions/social_mentions.install \_social_mentions_get_permissions()
- 10.1.x modules/social_features/social_mentions/social_mentions.install \_social_mentions_get_permissions()
- 10.2.x modules/social_features/social_mentions/social_mentions.install \_social_mentions_get_permissions()
Build the permissions.
1 call to _social_mentions_get_permissions()
- _social_mentions_set_permissions in modules/
social_features/ social_mentions/ social_mentions.install - Function to set permissions.
File
- modules/
social_features/ social_mentions/ social_mentions.install, line 42 - Install, update and uninstall functions for the social_mentions module.
Code
function _social_mentions_get_permissions($role) {
// Anonymous.
$permissions['anonymous'] = [];
// Authenticated.
$permissions['authenticated'] = array_merge($permissions['anonymous'], [
'access mentions',
]);
// Content manager.
$permissions['contentmanager'] = array_merge($permissions['authenticated'], []);
// Site manager.
$permissions['sitemanager'] = array_merge($permissions['contentmanager'], []);
if (isset($permissions[$role])) {
return $permissions[$role];
}
return [];
}