-
Notifications
You must be signed in to change notification settings - Fork 2
OpenScholar permissions
In OpenScholar there are two levels of permissions - site-wide permissions and VSite permissions. Site-wide permissions are like any Drupal site permissions, and controlled via admin/people/permissions.
VSite permissions are permissions defined per VSite via /cp/users/permissions. In the VSite permissions the permissions are separated into applications (not into modules, as in the site-wide permissions), and will show only the enabled applications in the VSite.
The top section in the VSite permissions is the "General permissions" section, which is a duplication of parts of the site-wide permissions.
Each permission in this section overrides the same site-wide permission..
Even if one of them is enabled as site-wide, it will be disabled if it is not enabled in the Vsite (and vice verse).
There are 3 default site-wide roles that are in use in OpenScholar. Unfortunately, two roles has different site-wide name and VSite name:
- "VSite admin" name in VSite level is "Administrator".
- "VSite user" name in VSite level is "Basic member".
The third role is "Content editor".
about the roles you can write about the "system roles" (vsite user; vsite admin; content editor) TBD - support_expire (a.k.a "Support team").
When developing for OpenScholar, and there is a need to add site-wide permission as a VSite permission, all you need to do is to implement "hook_og_permission()", add each permission, and add a special attribute "os_override" => TRUE. For example:
/**
* Implements hook_og_permission().
*/
function vsite_og_permission() {
return array(
'administer boxes' => array(
'title' => t('Administer boxes'),
'os_override' => TRUE,
),
'edit boxes' => array(
'title' => t('Edit boxes'),
'description' => t('Edit existing boxes.'),
'os_override' => TRUE,
),
);
}