### Eclipse Workspace Patch 1.0 #P drupal-district Index: sites/all/modules/tac_lite/tac_lite.module =================================================================== --- sites/all/modules/tac_lite/tac_lite.module (revision 1072) +++ sites/all/modules/tac_lite/tac_lite.module (working copy) @@ -115,7 +115,10 @@ '#options' => $scheme_options, '#required' => TRUE, ); - + $form['priority'] = array('#type' => 'checkbox', + '#title' => t('Give TAC Lite priority over other access modules.'), + '#default_value' => variable_get('tac_lite-priority', 0), + '#description' => '' . t('If you are only using this access control module, you can safely ignore this. If you are using multiple access control modules, and you want the grants given on individual nodes to override any grants given by other modules, you should check this box.') . ''); $ret = system_settings_form($form); // Special handling is required when this form is submitted. $ret['#submit']['_tac_lite_admin_settings_submit'] = array(); @@ -128,6 +131,8 @@ * the node access database table is rebuilt. */ function _tac_lite_admin_settings_submit($form_id, $form_values) { + // Save priority. + variable_set('tac_lite-priority', $form_values['priority']); // First, save settings the default way. system_settings_form_submit($form_id, $form_values); // Next, rebuild the node_access table. @@ -329,6 +334,7 @@ foreach ($tids as $tid) { $grant = array('realm' => $config['realm'], 'gid' => $tid, // use term id as grant id + 'priority' => variable_get('tac_lite-priority', 0), ); foreach($config['perms'] as $perm) $grant[$perm] = TRUE;