function _social_core_get_permissions in Open Social 10.2.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_core/social_core.install \_social_core_get_permissions()
- 8 modules/social_features/social_core/social_core.install \_social_core_get_permissions()
- 8.2 modules/social_features/social_core/social_core.install \_social_core_get_permissions()
- 8.3 modules/social_features/social_core/social_core.install \_social_core_get_permissions()
- 8.4 modules/social_features/social_core/social_core.install \_social_core_get_permissions()
- 8.5 modules/social_features/social_core/social_core.install \_social_core_get_permissions()
- 8.6 modules/social_features/social_core/social_core.install \_social_core_get_permissions()
- 8.7 modules/social_features/social_core/social_core.install \_social_core_get_permissions()
- 8.8 modules/social_features/social_core/social_core.install \_social_core_get_permissions()
- 10.3.x modules/social_features/social_core/social_core.install \_social_core_get_permissions()
- 10.0.x modules/social_features/social_core/social_core.install \_social_core_get_permissions()
- 10.1.x modules/social_features/social_core/social_core.install \_social_core_get_permissions()
Build the permissions.
Parameters
string $role: The role.
Return value
array Returns an array containing the permissions.
1 call to _social_core_get_permissions()
- _social_core_set_permissions in modules/
social_features/ social_core/ social_core.install - Function to set permissions.
File
- modules/
social_features/ social_core/ social_core.install, line 131 - Install, update and uninstall functions for the social_core module.
Code
function _social_core_get_permissions($role) {
// Anonymous.
$permissions['anonymous'] = [
'access content',
];
// Authenticated.
$permissions['authenticated'] = array_merge($permissions['anonymous'], [
'view own unpublished content',
'use text format basic_html',
'use text format simple_text',
'view the administration theme',
]);
// Content manager.
$permissions['contentmanager'] = array_merge($permissions['authenticated'], [
'access content overview',
'access toolbar',
'administer nodes',
'administer menu',
'access site reports',
'access administration pages',
'view all revisions',
'revert all revisions',
'delete all revisions',
'create url aliases',
'use text format full_html',
]);
// Site manager.
$permissions['sitemanager'] = array_merge($permissions['contentmanager'], [
'administer taxonomy',
'delete terms in expertise',
'edit terms in expertise',
'delete terms in interests',
'edit terms in interests',
'delete terms in topic_types',
'edit terms in topic_types',
'administer site configuration',
'administer users',
'administer account settings',
'administer themes',
'administer blocks',
'access contextual links',
]);
return $permissions[$role] ?? [];
}