function _social_group_flexible_group_get_permissions in Open Social 8.9
Same name and namespace in other branches
- 8.6 modules/social_features/social_group/modules/social_group_flexible_group/social_group_flexible_group.install \_social_group_flexible_group_get_permissions()
- 8.7 modules/social_features/social_group/modules/social_group_flexible_group/social_group_flexible_group.install \_social_group_flexible_group_get_permissions()
- 8.8 modules/social_features/social_group/modules/social_group_flexible_group/social_group_flexible_group.install \_social_group_flexible_group_get_permissions()
- 10.3.x modules/social_features/social_group/modules/social_group_flexible_group/social_group_flexible_group.install \_social_group_flexible_group_get_permissions()
- 10.0.x modules/social_features/social_group/modules/social_group_flexible_group/social_group_flexible_group.install \_social_group_flexible_group_get_permissions()
- 10.1.x modules/social_features/social_group/modules/social_group_flexible_group/social_group_flexible_group.install \_social_group_flexible_group_get_permissions()
- 10.2.x modules/social_features/social_group/modules/social_group_flexible_group/social_group_flexible_group.install \_social_group_flexible_group_get_permissions()
Build the permissions.
Parameters
string $role: The role.
Return value
array Returns an array containing the permissions.
1 call to _social_group_flexible_group_get_permissions()
- _social_group_flexible_group_set_permissions in modules/
social_features/ social_group/ modules/ social_group_flexible_group/ social_group_flexible_group.install - Function to set permissions.
File
- modules/
social_features/ social_group/ modules/ social_group_flexible_group/ social_group_flexible_group.install, line 46 - Install and update functions for the social_group_flexible_group module.
Code
function _social_group_flexible_group_get_permissions($role) {
// Anonymous.
$permissions['anonymous'] = [];
// Authenticated.
$permissions['authenticated'] = array_merge($permissions['anonymous'], [
'create flexible_group group',
]);
// Content manager.
$permissions['contentmanager'] = array_merge($permissions['authenticated'], []);
// Site manager.
$permissions['sitemanager'] = array_merge($permissions['contentmanager'], []);
return $permissions[$role] ?? [];
}