_taxonomy_access_get_nodes_for_role() returns only nodes in terms specifically controlled in {term_access}. If a vocabulary default is set, nodes with other terms from that vocabulary are not properly updated.

CommentFileSizeAuthor
#6 tac_739874-6.patch4.84 KBxjm
#3 tac_739874-3.patch5.31 KBxjm
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xjm’s picture

Status: Active » Needs review

Attached patch adds nodes associated with entries in {term_access_defaults} to the list of nodes to update.

xjm’s picture

Status: Needs review » Needs work

It occurs to me that, if the role's global default is different from the authenticated user default, then a full node access rebuild should happen (since the role's permissions on every single node will change). So, we should check for this on role deletion.

xjm’s picture

Status: Needs work » Needs review
FileSize
5.31 KB

Attached patch includes the changes to _taxonomy_access_get_nodes_for_role() from #1, plus a check in function taxonomy_access_admin_delete_role() to see whether the global default for the role was the same as the authenticated user's. If it was, only nodes in controlled terms and vocabs are updated; if it wasn't; node access is flagged for rebuild.

xjm’s picture

Title: Some nodes not updated on role deletion » Some nodes not updated on role disable
xjm’s picture

Status: Needs review » Needs work

I'm going to modify this slightly to remove grant_create and grant_list from the query comparing the role global default to the authenticated user's. There's no need to trigger node_access_needs_rebuild() unless one of the actual node access permissions is different.

xjm’s picture

Status: Needs work » Needs review
FileSize
4.84 KB

Attached patch includes the change described in #5.

xjm’s picture

Tested the patch; it still works properly.

xjm’s picture

Status: Needs review » Fixed

#6 committed to 6.x-1.x-dev:
http://drupal.org/cvs?commit=341034

Status: Fixed » Closed (fixed)

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