Closed (duplicate)
Project:
Taxonomy Access Control
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
21 Sep 2007 at 11:50 UTC
Updated:
12 Sep 2014 at 20:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
anttih commentedThere is currently a possibility to have a *default* permission for a vocabulary. Hierarchical vocabularies would benefit from similar *default* permissions for terms too. A new term would then inherit the permissions of its parent term. If multiple parents are allowed, the admin would probably need to be able to decide whether the inherited permissions are anded or orred, probably on per vocabulary basis. If I understood the original feature request correctly, this would solve that problem too.
Comment #2
xjmIf I've understood correctly, I am looking for this functionality as well--I want users who have permissions granted for a certain term to have grants for all the child terms as well, without having to add every single term to the form. My vocabulary defaults need to be set to "Ignore" so that the children of other terms don't get access granted unintentionally.
Comment #3
hellznrg commentedi'm looking for this feature too... currently i have my site organized into "levels"..
Level 0 (root)
-Level 1
--Level 2
---Level 999
if i tag a node as "level 1", i only want people of level 1 or higher level to be able to view it.. but if i assign the "level 1" role allow permission to "level 1" nodes, they can't see "level 2" and "level 999" nodes without an explicit permission
Comment #4
mr.andrey commentedsubscribing... would like to see a recursive functionality as well.
Comment #5
mr.andrey commentedCheck out #689668: Recursive functionality: automatically set permission to the child terms.
Comment #6
xjmAlso related:
#364065: More options when Adding Terms and Vocabularies
#358064: Add term default permission should be the same as the vocabulary default (when it exists) or the global default
#364058: Allow configuration of TAC permissions on term/vocab create/edit
#359534: Adding Child Terms with Parents
#38020: Inherited values?
Comment #7
xjmComment #8
xjmApparently the Taxonomy Access User module provides this sort of inheritance, so would be worth looking that module over to see how they implement it.
Comment #9
xjmGot a +1 for this today from IRC, specifically for use with forum.module where forums are being added by someone who does not have access to administer TAC.
Comment #10
xjmNote that we would probably want to add this as a configuration option, as this would introduce a change in behavior that might not be expected for some configurations
Comment #11
BoogieBug commentedHere's a quick patch to the taxonomy_access.module to enable the permission inherit to the un-configured term(s). This will enable the feature by default and cannot disable when patched. I'd like to leave the Configuration UI task to the maintainer.
I've tried to create a new module to extend the ability but unfortunately it is impossible to override the outcome from hook_db_rewrite_sql() to allow the 'create' and 'list' to be inheritable.
Comment #12
BoogieBug commentedSorry, I put the wrong patch file. Please ignore my previous one and use this one.
Comment #13
BoogieBug commentedI've just realised that the $node->taxonomy is in different format in different situation: when new node is added and when the permission is rebuilt. This is the bugs-fix version for the patches in #11 and #12 against the current HEAD version (06 Nov 2010).
Also this patch allow the administrator to disable the inheritance by setting the variable TAXONOMY_ACCESS_CFG_INHERIT to 0 or FALSE (either using variable_set() or by directly insert into the database).
I wonder if the maintainer still monitor this issue?
Comment #14
xjmI pay the most attention to issue statuses. If there's a patch that's needs review, set the issue to Needs Review. :)
I'd like to see some users test this patch before I review it. We'd also probably need to include a hook_update_N() since this changes the behavior of the module for those child terns.
Edit: Also, just skimming, the patch needs a little code cleanup. E.g., leave out the comments about what section you've added; that's what the diff is for. :)
Comment #15
xjmAlso, the way $list is being used in the query here is not very clean; we need to be a little more careful for security. See:
So I'd say fix that, clean up the comments a bit to standards, and then we'll give it another look.
Comment #16
francewhoaAny volunteers to update the patch in comment #13 or make a new one? We would be happy to contribute patch testing.
Comment #17
xjmTagging.
Comment #18
renenee commented+1 Also interested in this functionality.
Comment #19
davidneedhamProbably doesn't matter 3 years later, but I believe this is a duplicate of #689668: Recursive functionality: automatically set permission to the child terms..
FYI: That fixed this issue for D6, but it strangely no longer exists in D7: #1673558: Set access set at partent term level? .