function schools_perm
Search API
7.x schools.module | schools_perm() |
6.x schools.module | schools_perm() |
File
- modules/
schools/ schools.module, line 1526 - Schools module.
Code
function schools_perm() {
$rtn = array();
$rtn ['administer_schools'] = array('title' => 'Administer schools module', 'description' => 'Only give to admin role.');
// Add in permissions per school.
$defs = schools_get_school_definitions();
$types = array('degree', 'group', 'course');
foreach ($types as $type) {
foreach ($defs as $school_id => $school_desc) {
$rtn ['administer_' . $school_id . '_' . $type . '_data'] = array('title' => t('Administer %school_desc @type data', array('%school_desc' => $school_desc, '@type' => $type)),
'description' => t('The user is allowed to edit @type data for %school_desc.
Note: The user MUST also be given the Edit Data Entry permission under Admin module.',
array('%school_desc' => $school_desc, '@type' => $type)));
$rtn ['manage_' . $school_id . '_user_data'] = array('title' => t('Administer %school_desc users', array('%school_desc' => $school_desc)),
'description' => t('The user is allowed to edit and create users for %school_desc.
Note: the user MUST also be given the Manage users permission under the User module.
', array('%school_desc' => $school_desc, '@type' => $type)));
$rtn ['search_students_' . $school_id] = array('title' => t('Search for students in %school_desc', array('%school_desc' => $school_desc)),
'description' => t('The user is allowed to search for students belonging to %school_desc.
Note: To advise, the user will need additional permissions.',
array('%school_desc' => $school_desc)));
}
}
return $rtn;
}