Hi,

I'm new to both Drupal and TAC so I may be missing something here. I have Drupal 6.6 and on the
frontpage I use views to list down the latest stories (just the title that links to the content).

In the Taxanomy, I created vocabulary called "Access" and added the term "VIP". I made it not
required. I also created a user role called "vip user".

Then under "User Management" > "Taxonomy access permissions", I clicked on "edit" next to the anonymous user.
Here's how I have it set up: http://www.webbriefcase.net/screen/DrupalTac.png

I thought that this would Deny the anonymous user from viewing nodes with VIP access but still list the titles
on the frontpage.

Althought they are not able to view the nodes, the title of the nodes are also not listed
in the frontpage view of the latest stories.

Did I apply this incorrectly?

~ Bina.

CommentFileSizeAuthor
#6 tac_fields.tar_.gz8.72 KBxjm

Comments

xjm’s picture

The "list" checkbox doesn't work that way, unfortunately. It doesn't control whether the node is allowed to be listed; rather, it controls whether the term is listed on the node's page. This is something that confuses a lot of people, so it probably needs to be improved in the documentation at least.

The issue of how to allow nodes to be listed on the front page or in a view while protecting the content of the nodes is one I need to solve as well. One solution is to use CCK's field access control to hide everything but the node title from the roles who shouldn't see it, but that can't be controlled based on taxonomy (plus leaves a lot of empty node pages sitting around unless you do some extra work to hide them).

My plan for D6 is to create a module that allows TAC to interact with CCK's field access permissions:
http://groups.drupal.org/node/28700

xjm’s picture

Marked #645770: Teaser Access in Views as duplicate.

xjm’s picture

Title: Show Links to Node but Not the Node Itself » Restrict node except for teaser/file/specific field/title...
xjm’s picture

Category: support » feature
xjm’s picture

Status: Active » Needs work

Attached module implements per-field access control using TAC's logic and UI. This can be used to restrict one or all of the fields of a node based on taxonomy without restricting the node itself entirely.

It works for the most part--controlled fields are displayed or hidden as appropriate from the settings--although it doesn't seem to properly deny access to private files in restricted filefields the way that content_permissions.module does. I haven't tested caching or indexing of nodes.

xjm’s picture

StatusFileSize
new8.72 KB
xjm’s picture

The UI in #6 is a bit clunky and tedious if one is configuring multiple fields/roles. It would be helpful to have the option to clone from one role to another, from one field to another, and/or from TAC to TAC Fields, or perhaps to have "access profiles" that could then be assigned to field/role combos with a checkbox. See also #364060: Clone Taxonomy Role.

xjm’s picture

Also, this module currently allows restricting fields from user 1.

nwe_44’s picture

subscribing

xjm’s picture

@#10: If you are interested in this feature, any feedback you could provide on the module in #6 would be appreciated! (Just don't use it on a production site.)

nwe_44’s picture

thanks xjm, I downloaded #6 and am testing it today. So far it works as advertised.

FYI, I'm using a custom module which uses your tac_fields_field_access()

I've tested it with simple logic, which is to say a single node with one taxonomy term associated. I'll now test it against more complex situations. I'll let you know how I get on.

nwe_44’s picture

ok, so far so good. The existing TAC logic appears to be being followed for nodes with two taxonomy terms, with "Allow" taking precedence over "Deny". I'm not getting any error messages.

nwe_44’s picture

OK, sorry for silence, project had been on hold.

First bug, or at least behaviour I didn't expect is that, TAC appears to be set to "// Deny access by default for fields we do control." on line 215. That would be fine except it prevents new nodes from being created with that field being populated, since the new node form has no taxonomy terms attached to it.

nwe_44’s picture

As a followup to #14 it seems to me that, until another $op for "edit" is added to the permissions TAC fields controls, the quick fix is to add;

  if(!$nid){
  	return TRUE;
  }

somewhere around line 142 of tac_fields.module

danny englander’s picture

subscribing

xjm’s picture

I'm going to go ahead and commit this to -dev (with massive caveats about it being experimental) so we can open specific issues for different things.

#14/15 is interesting; I need to think a little more about the implications there.

xjm’s picture

Status: Needs work » Fixed
xjm’s picture

xjm’s picture

Component: User interface » TAC Fields

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.