***This is for the current CVS version of the module, version 1.7***

Two bugs are fixed with the attached patch:
=================================
---On a freshly installed system, taxonomy_access causes harmless but annoying warning errors.
---Users do not see the "Access denied" message when viewing a category page they do not have access to. They see an empty category and the title of the category which is unwanted behavior.

Installation of this patch (NOTE: the instructions here are only valid only until patch gets into the CVS):
===================
If you are already using the CVS version of this module and everything is working pretty well, just apply the patch.

Author's note: The instructions are meant to be step by step guide for those who are familiar with patching files and managing a database. They are not meant for anyone else. If you have questions about how to patch a file or how to delete data from tables, please search the web or this site. The information is out there and there is no need for me to recreate it.

If you are using version 4.5.0 of this module or you have tried upgrading to the CVS version but are experiencing serious problems, do the following:
1) Disable the taxonomy_access module in admin/settings/taxonomy_access (if available)
2) Uninstall the module from Drupal in admin/modules
3) Go to the mysql prompt (or your favorite mysql GUI program) and delete the term_access data from the database (You will be required to rebuild your permissions manually again. Sorry.)
4) Delete all the data from the node_access table.
5) Download the CVS version of taxonomy_access.module from http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/modules/ta...
6) Download the attached patch and apply it to the CVS version just downloaded.
8) Apply the patch to the CVS version.
9) Place the patched module into your modules/taxonomy_access directory.
10) Install the module in Drupal at admin/modules
11) Enable the module at admin/settings/taxonomy_access
12) Set your permissions in admin/user/configure/category

If you do not have taxonomy_access yet installed, do the following:
1) Download the taxonomy_access tarball from http://drupal.org/files/projects/taxonomy_access-4.5.0.tar.gz
2) Untar the package into your modules directory
3) Install the databases tables per the INSTALL instructions in the newly downloaded module. DO NOT do anything else, just install the tables.
4) Follow steps 5 though 12 above.

CommentFileSizeAuthor
taxonomy_access_6.patch414 bytesSteve Dondley

Comments

nazadus’s picture

Fixed my issues.
Excellent work!

Steve Dondley’s picture

Good glad to hear it worked. But please keep your eye out for any more bugs and let me know if you see any.

In my instructions above, I forgot step 13: Install the taxonomy.patch (if it isn't already)

sami_k’s picture

good work!

Steve Dondley’s picture

Oops, just noticed I didn't use the -u switch on the diff. Sorry.

mimi-1’s picture

Sounds great. Download and test it. Looks good.
Thanks. Hopefully something like this will move into the core someday

mimi-1’s picture

Good!
However, a few suggestions:
It would be better for the Anomymous user and Authentic user to automatically have "view" checked. I was scared when I see all post disappeared, then I find out that I did not check the boxes.

Another feature would be great, is there anyway that the user can set the node "private" or "public" whenever he/she create a node? Maybe this should be about anothe module.

Steve Dondley’s picture

You wrote "It would be better for the Anomymous user and Authentic user to automatically have "view" checked."

But aren't these precisely the kind of users that most likely will NOT hvae permission to view restricted content?

As far as node by node permissions, see node_privacy_byrole.module.

pyromanfo’s picture

Okay, added to CVS

However, the default for node_access is view only permissions, so I stuck to that instead. Until Dries opinion changes, last I heard he wants default access to be view only for all users. If you want to restrict content, you need to actually go into the interface and specify what content to hide from whom.

njivy’s picture

Best I can tell, it is logically impossible to restrict viewing with the current defaults. The SQL around line 311 grabs the default tuple and the tuple for the user's role and performs a logical OR. If the default is always TRUE, then the OR will always be TRUE.

Personally, I'm not sure why we have tuples for rid=0. There is no role #0. Anonymous people are role #1, so I don't see when rid=0 will ever be useful.

Steve Dondley’s picture

rid = 0 will be removed soon. There was a bug (bit I wasn't sure if it was a bug at the time, though) in 4.5.0 that has been fixed in 4.5.1 where you could conceivably have users with no role. That's why that code was in there.

Steve Dondley’s picture

rid = 0 will be removed soon. There was a bug (bit I wasn't sure if it was a bug at the time, though) in 4.5.0 that has been fixed in 4.5.1 where you could conceivably have users with no role. That's why that code was in there.

pyromanfo’s picture

I got rid of the rid=0 thing.

Anonymous’s picture