source: sipes/modules_contrib/module_grants/module_grants.admin.inc @ de78188

stableversion-3.0
Last change on this file since de78188 was 177a560, checked in by José Gregorio Puentes <jpuentes@…>, 8 años ago

se agrego el directorio de modulos contribuidos de drupal

  • Propiedad mode establecida a 100644
File size: 2.5 KB
Línea 
1<?php
2
3/**
4 * @file
5 * Admin configuration settings for Module Grants.
6 */
7
8/**
9 * Menu callback for admin settings.
10 */
11function module_grants_admin_configure() {
12  $access_modules = array();
13  foreach (module_implements('node_grants') as $module) {
14    $access_modules[] = $module;
15  }
16
17  $form['module_grants_multiple_modules'] = array(
18    '#type' => 'fieldset',
19    '#title' => t('Configure behaviour when multiple content access modules are enabled'),
20    '#description' => t('The following content access modules are currently enabled: %modules.',
21      array('%modules' => empty($access_modules) ? 'none' : implode(',', $access_modules)))
22  );
23  $form['module_grants_multiple_modules']['module_grants_lenient'] = array(
24    '#type' => 'checkbox',
25    '#title' => t('Interpret absence of access grants as a "don\'t care", rather than a "deny access".'),
26    '#default_value' => variable_get('module_grants_lenient', TRUE),
27    '#description' => t('Only applies when two or more content access modules are enabled and one of the modules makes no statement about a node that is about to be accessed. If this box is checked, then a content access module saying nothing (via the node_access table) about the node in question will be deemed to be ok with the user having access to it. If not checked (i.e. "strict"), then a module saying nothing will be taken as a "deny access".')
28  );
29  $form['module_grants_multiple_modules']['module_grants_OR_modules'] = array(
30    '#type' => 'checkbox',
31    '#title' => t('OR rather than AND the access grants from multiple modules.'),
32    '#default_value' => variable_get('module_grants_OR_modules', FALSE),
33    '#description' => t('Normally you would <strong>not</strong> tick this box, except for testing purposes. To "OR" access grants coming from multiple modules means that content is being made accessible by one module when access has already been restricted by another. "OR" is core-behaviour and is undesirable in most cases. Bad cORe behaviour is the reason Module Grants was written in the first place.')
34  );
35  $form['show_taxonomy_terms'] = array(
36    '#type' => 'checkbox',
37    '#title' => t('Add a taxonomy <strong>Term</strong> column to the accessible content summary, if applicable.'),
38    '#default_value' => variable_get('show_taxonomy_terms', TRUE),
39    '#description' => t('This column will only be shown if the <em>Taxonomy</em> module has been enabled <em>and</em> vocabularies have been defined.')
40  );
41  return system_settings_form($form);
42}
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.