You are here

function _tac_lite_config in Taxonomy Access Control Lite 5

Same name and namespace in other branches
  1. 6 tac_lite.module \_tac_lite_config()
  2. 7 tac_lite.module \_tac_lite_config()

helper function

6 calls to _tac_lite_config()
tac_lite_admin_scheme_form in ./tac_lite.module
Returns the form for role-based privileges.
tac_lite_db_rewrite_sql in ./tac_lite.module
tac_lite_node_access_records in ./tac_lite.module
Implementation of hook_node_access_records
tac_lite_node_grants in ./tac_lite.module
Implementation of hook_node_grants
tac_lite_user in ./tac_lite.module
Implementation of hook_user().

... See full list

File

./tac_lite.module, line 145
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(),
    ));
  }

  // 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;
}