On deactivation of TAC, the node_access table should get celared. However, I just tested this with Drupal 4.7.2, and it doesn't seem to happen correctly either when selecting "Deavtivate" or "reset to defaults" from the /admin/settings/taxonomy_access page.

Using MySQL 4.1, PHP 4.4.2, and TAC version:

// $Id: taxonomy_access.module,v 1.77 2006/04/14 12:59:05 keve Exp $

CommentFileSizeAuthor
#1 TAC_clear_grants_1.diff963 bytespwolanin

Comments

pwolanin’s picture

StatusFileSize
new963 bytes

Attached patch adds additional SQL query to clear out all rows where realm == 'term_access' upon module deactivation.

tested with setup as above.

pwolanin’s picture

Status: Active » Needs review

oops- chaging status

keve’s picture

Status: Needs review » Closed (won't fix)

This is intentional. It works the same in other node access modules. (without clearing node_access table).

Disabling the module simply requires re-inserting the default entry back into the node access table to give 'view' perms to everyone for everything: (0, 0, 'all', 1, 0, 0)

pwolanin’s picture

Status: Closed (won't fix) » Needs work

This issue needs to be looked at in context of this attempt to improve the caching system : http://drupal.org/node/72617#comment-119814

where Gerhard used the presence of > 1 row in the node access table to change the caching behavior.

So, the fundamental question may be whether there is a better way to check whether any access-control module is active? Also, I don't see the down side to this patch. It would seem to give a cleaner deactivation.

keve’s picture

Thanks for recommandations.
I will look through it. :)

keve’s picture

1. I guess this feature should go to very new hook: hook_disable: http://drupal.org/node/45831.

I would reserve deactivate/activate on settings page for temporary de/activation of TAC system.

2. Apart from abouve:
I guess a 'housekeeping' fieldset would be good on settings page w/options:
a). completely clear node_access table (and Deactivate TAC)
b). Completely refresh node_access settings based on your category permission settings.

What do you think?

pwolanin’s picture

Seems as though there is also some related functionality going into core: http://drupal.org/node/72617#comment-121990

So, probably best not to chase HEAD, and rather let the dust settle after Sept 1st!

keve’s picture

Version: 4.7.x-1.x-dev » master
Status: Needs work » Fixed

This is solved w/ incorporated na_arbitrator (Drupal 5.0)

Anonymous’s picture

Status: Fixed » Closed (fixed)