Hello,

I'm running the latest Drupal + CCK + Taxonomy Access modules (to mention a few). Recently, we encountered
a problem with Taxonomy Access module and we need your help - as we may have missed something.

So, a basic outline how the site configuration looks like:

1. Created a taxonomy category called "Cities"
2. Created a custom node type "News" with CCK
3. Both "Node" and "News" content types has "Cities" category assigned, while "node" is the default content
type for the rest of our pages.

Now, I try to configure the permissions for the nodes with Taxonomy Access. It's working fine if I set the permissions
category-wise, but there's no possibility to take the "content type" parameter into account...

What we need to do is to define _separate_ permissions sets based on Taxonomy AND each custom content type.
E.g.: "News" -> "Cities" and "Node" -> "Cities" would have different permissions according to the role.

Am I really missing something, or Taxonomy Access is not providing such a functionality?

Any thoughts on this one would be highly appreciated.

Cheers
Bartek

Comments

bchoc’s picture

Taxonomy Access Control module just controls access based on taxonomy terms. So, no, it won't directly permit/deny access based on a node type.

(As an aside, having a node type called "node" might lead to confusion. Or maybe not -- just a thought.)

Anyway, if you want to control write access to a node type, that can generally be accomplished through the standard User management > Access control menu without TAC or any other module. If you want to control read access to a node type, you can do this with TAC by assigning a term to every node within the type. For example, tag every "news" item "news" then set permissions for the tag news. (Alternatively, you can use tags based on user role instead of content type.) Now, I don't suggest you assign these roles this by hand ... just make a required vocabulaty with only one term and then every piece of content will get that tag when it's created. Then you can use TAC to control read access.

Does that help and/or make sense?

cboshuizen’s picture

Surely there is a module to control read permissions of given content types by role? For that matter, it surprises me that CCK just doesn't add a "Allow reading of content type XXX" to the Access Control page.

One way to create this functionality with TAC is to create a vocabulary "Node Type Restriction" with a single category "Restricted Node" and assign it to the required node type XXX, ticking the required box. In TAC you don't need to set anything, but at least make sure that Anonymous and Authenticated Users are set to 'Ignore'. Setting 'Deny' won't work because IIRC that will deny users regardless of other Allow settings (correct me if I am wrong).

So what you have done is ensured that every node of type "XXX" has been assigned a restrictive category, and that because there is only one category in that vocab it has been chosen by default. Ticking 'required' is important to ensure this happens without relying on your users assigning it each time.

Is there a more elegant solution for this? I call for a CCK addition.

cboshuizen’s picture

Don't forget that you will need to tick "Create" for this category type in TAC for the roles that are allowed to view/create your restricted content type. Otherwise, they category will not show on the add page, and so won't be assigned.

edrex’s picture

Status: Active » Closed (won't fix)