function _tac_lite_config in Taxonomy Access Control Lite 6
Same name and namespace in other branches
- 5 tac_lite.module \_tac_lite_config()
- 7 tac_lite.module \_tac_lite_config()
helper function
7 calls to _tac_lite_config()
- tac_lite_admin_scheme_form in ./
tac_lite.module - Returns the form for role-based privileges.
- tac_lite_create_form_alter in ./
tac_lite_create.module - Implementation of hook_form_alter().
- tac_lite_db_rewrite_sql in ./
tac_lite.module - tac_lite_node_access_records in ./
tac_lite.module - Implements hook_node_access_records().
- tac_lite_node_grants in ./
tac_lite.module - Implementation of hook_node_grants().
File
- ./
tac_lite.module, line 154 - Control access to site content based on taxonomy, roles and users.
Code
function _tac_lite_config($scheme) {
// different defaults for scheme 1
if ($scheme === 1) {
$config = variable_get('tac_lite_config_scheme_' . $scheme, array(
'name' => t('read'),
'perms' => array(
'grant_view',
),
));
}
else {
$config = variable_get('tac_lite_config_scheme_' . $scheme, array(
'name' => NULL,
'perms' => array(),
));
}
// Merge defaults, for backward compatibility.
$config += array(
'term_visibility' => isset($config['perms']['grant_view']) && $config['perms']['grant_view'],
);
// For backward compatability, use naming convention for scheme 1
if ($scheme == 1) {
$config['realm'] = 'tac_lite';
}
else {
$config['realm'] = 'tac_lite_scheme_' . $scheme;
}
return $config;
}