function _tac_lite_config in Taxonomy Access Control Lite 7
Same name and namespace in other branches
- 5 tac_lite.module \_tac_lite_config()
- 6 tac_lite.module \_tac_lite_config()
helper function
8 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_form_alter in ./
tac_lite.module - Implementation of hook_form_alter().
- 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 193 - 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'],
'unpublished' => FALSE,
);
// 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;
}