Our newly installed Taxonomy Term Permissions module does not seem to have any effect. I set all terms in a vocabulary to be accessible to only the administrator role. However a test user assigned only to a different test role can see and set any of the terms in that vocabulary when creating content for a content type that has that vocabulary assigned to it. I confirmed that the other role is not selected for any of the taxonomy terms; and I confirmed the test user is only in one test role (in addition to the default "authenticated" role).
The only other non-core taxonomy related module installed on our Drupal is Taxonomy Super Select 6.x-1.0. Could there be a conflict?
I must be missing something -- any ideas?
Our Drupal is 6.15
Thanks!
Jerry
| Comment | File | Size | Author |
|---|---|---|---|
| #44 | term_permissions-701746-44.patch | 1.08 KB | misc |
| #43 | term_permissions-701746.patch | 1.22 KB | dshields |
| #27 | term_permissions_fix.patch | 1.08 KB | jmrivero |
Comments
Comment #1
jkdrupal commentedIt occurred to me to disable Taxonomy Super Select and try again. After disabling TSS, the Taxonomy Term Permissions module worked as expected. So, this raises the question: can Taxonomy Term Permissions and Taxonomy Super Select work together?
Thanks!
Jerry
Comment #2
jkdrupal commentedTo elaborate my previous comment: If only Taxonomy Permissions is enabled, it works correctly; if only Taxonomy Super Select is enabled, it works correctly; if both are enabled, then that is when there are problems.
I was hoping it would work to have Taxonomy Permissions function first, then have Taxonomy Super Select do its nice organization of the taxonomy terms that the user's role is permitted to access (from Taxonomy Permissions). But it does not work this way. I do not know if this is a bug with Taxonomy Permissions or Taxonomy Super Select.
It is also possible that those two modules will not work together in the way I thought they would -- but if this is the case, I am hoping that someone supporting either of those two modules could clarify this for me. Thanks!
Comment #3
sohail_arif commentedPermssions setting have no effect. The user names which have not given any permission for viewing forum, they can view,add,edit and delete forum.
Comment #4
davide1982 commentedguys, I have the same issue with me but I don't have that Taxonomy Super Select module at all. But there is no effect again ((
Comment #5
smscotten commentedIt looks as though the admin user sees everything no matter what. Logged in as a regular user, the permissions correctly restrict access to the terms. When I first tried it out I was logged in as admin and I couldn't make the terms disappear.
Hope that helps.
Comment #6
jkdrupal commentedSplicer: for the testing I have done, I test with both a user in the administrator role, and for a user not in the administrator role. In every case that I have tested so far, a non-administrator role user will see all taxonomy terms if that vocabulary is set to be displayed via Taxonomy Super Select. I have tried different adjustments of the weights of Taxonomy Term Permissions (TTP) and Taxonomy Super Select (TSS) . Nothing I have tried achieves the desired behavior in which TSS will display only those terms allowed by the permission settings in TTP.
Comment #7
-Mania- commentedThe permissions do not work for me at all and I don't have Taxonomy Super Select. I'm trying to restrict Anonymous users from accessing a particular taxonomy term but the settings do not apply. I've tried all the other taxonomy permission modules as well but there seems to be no working solution at the moment. :(
Comment #8
JoelKleier commentedJust a note: I thought I had an issue where my terms were not reading permissions I had set correctly -- I had set permissions for specific terms within a vocabulary to only be visible to a certain group, but that group was still able to see all the other terms.
It appears to be because, by default, all terms are visible to all roles, unless they have permissions explicitly defined.
It was probably in the documentation, and I probably just over looked it. I thought I'd mention it here, though, just in case anyone has a similar "problem", and it is not caused by an actual bug that this issue is tracking.
Comment #9
jhuon commentedSame issue here. All my terms are assigned to a specific role, but restrictions have no effects. Any role has access to any term. And I don't have Taxonomy Super Select module.
Comment #10
thaddeusmt commentedThe module was also apparently not working for me. I traced it to the fact that I am running this on an old PHP4 server. The unset() isn't working properly with the pass-by-reference variables in term_permissions_form_alter().
I fixed it by replacing:
unset($terms->option[$tid]); ( line 129 )
with:
unset($form['taxonomy'][$vid]['#options'][$termCount]->option[$tid]);
(and adding a $termCount counter to foreach($vocabulary['#options'] as $terms) loop)
Sort of crummy, wish they would upgrade this server to PHP5!
Comment #11
deviantintegral commentedO really...
If others can confirm that the fix in #10 fixes the issue, I'll roll a patch, unless there is consensus to make PHP 5.2 required for the module.
Comment #12
jkdrupal commentedI am almost 100% certain the server I am using is php 5.x -- so the problem I described at the beginning is not limited to php 4 implementations. I will check to confirm which version of php is on the server and post that here.
Jerry
Comment #13
jday commentedusing php 5.2 and taxonomy super select, the permission settings are having no effect, excluded roles can still select forbidden terms.
Comment #14
t.feltl commentedIn my case helped to increase the "weight" of the module. I set module weight to 10 and everything works as it should :-)
Comment #15
deviantintegral commentedThanks for the info about weight. If someone else can confirm that weight makes it work, I can make an update to change it.
http://drupal.org/project/util can be used to change module weights for those who aren't comfortable doing it in the database directly.
Comment #16
davidbessler commentedI am using php 5.26
I do not have Taxonomy Super Select installed.
I have tried module weight 10, 1000 and -1000
I have rebuilt permissions after each change.
Still, my average users can see and select the taxonomy terms for which I have set permissions to only allow admins to select.
To be clear, I am using the taxonomy list as an exposed search term within a view. I am assuming that is supported.
Comment #17
louis_gaff commentedSame here. Taxonomy Permissions have no effect.
What I'd like to do is just make sure a specific taxonomy term can be seen only by two people: The person who the taxonomy is named after, and the admin. Taxonomy Permissions is totally not working... :(
Comment #18
marcinp commentedJust wanted to confirm that on my drupal installation weight had to be changed to make it work. With default settings $form['taxonomy'] is not set, setting weight to 10 didn't help either, changed it to 30 and taxonomy key was present. Could have something to do with installation of Hierarchical Select which has weight of 16, also removed (!variable_get('taxonomy_override_selector', FALSE)), probably also related to HS module. I'm using HS on different Vocabulary than Term Permissions and didn't notice any problems so far. Hope this helps someone.
Comment #19
groovedork commentedSame problem here.
WAMP PHP 5.2.11
Drupal 6.17
Content Taxonomy 6.x-1.0-rc2 (including Content Taxonomy Options)
Taxonomy Super Select 6.x-1.0
Taxonomy term Permissions 6.x-1.0
Taxonomy Image 6.x-1.6 (with every sub-module enabled except Image Attach)
Unfortunately using Util doesn't change anything. Tried at at -1,0,1,6, 10, 30...
Comment #20
tsmorty commentedWanted to use this module but after installing it and setting up permissions no go. I even used util to increase it's weight to 30. Still no fix, so I dropped it back down to 0.
I then headed marcinp comment. By using Notepad++ I opened the term_permissions.module file and on line 111 removed " && (!variable_get('taxonomy_override_selector', FALSE)) " after saving this and chucking it up to the server the problem was resolved.
This seems to be due to hierarchical select being installed on my installation setting that to TRUE even though I am telling that term not to use it. None the less it doesn't seem to have affected HS. Not sure by whom this should be fixed than.
You can see another issue that explains HS causing problems with another module. https://drupal.org/node/619726
Comment #21
sidharth_k commentedI can confirm that Hierarchical Select also interferes with term_permissions. Once I disable Hierarchical Select, Term Permissions work properly.
Comment #22
kapep commentedSee #895542: Conflicts with i18ntaxonomy hook_form_alter(), it's also a module weight problem.
Comment #23
bramley commentedThis would be really useful for me too. I'm using Content Taxonomy, so it would need to work with this too.
Comment #24
stewestI'm also struggling (rather suddenly_ with Taxonomy Term Permissions it seems.)
I'm using: Drupal 6.19
Taxonomy Defaults 6.x-1.0 weight -1
Taxonomy hide 6.x-1.02 1 weight 0
Taxonomy Manager 6.x-2.2 weight 0
Taxonomy Role 6.x-1.0-beta1 weight 99
Taxonomy Term Permissions 6.x-1.0 weight 50 (also tried -10 and 110)
Via Term page Permissions:
When a user is given permission to a term, they still don't see Edit tab on node page.
When a role is given permissions on a term, they also don't see edit tab.
Via User Permissions:
Only if role is given permission to edit any of that node's content type, can they see the edit tab. But then all users of that role can edit nodes of that term.
I rebuilt permissions, cleared cache all and have run an update. Still isn't working.
This started happening (well, was first noticed) this week for first time when we created a new user and treid to give them access to edit the node / linked to that term?
Looking in the DB at term_permissions)user table, the UID is assigned to the tid. So it is writing to the db.
There must be something else happening or overriding this?
A side note, not sure if this would mess things up?
Menu Per Role (still 6.x-1.3) module may be acting up?
(As latest 6.x.1-8 broke my site - there is a bug in 1.8. Apparently 1.7 is better. I just stayed on 1.3 for now rather) Perhaps this is conflicting?
I wonder if I should change the weight so the module runs before after one of the others. Any thoughts?
Comment #25
tchurch commented+1
Comment #26
Gordon_Holtslander commentedI am using term_permissions, with Taxonomy Menu, Taxonomy Menu Custom Path, Taxonomy Menu Hierarchy, Taxonomy Menu Vocabulary Path.
Taxonomy Term Positions, has no effect. An anonymous user can search for find and access content that should be restricted.
I have changed the weight of the module with no effect.
I have removed " (!variable_get('taxonomy_override_selector', FALSE)) " with no effect
Comment #27
jmrivero commentedFound the problem, this patch should fix it.
Thing is that for the roles validation it was looking into $user->roles array keys insted of the array values.
Comment #28
Leiph commentedPatch doesn't work for me, I get this warning message:
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'user)' at line 1 query: SELECT rid FROM term_permissions_role WHERE tid = 343 AND rid IN (authenticated user) in /home/mydir/modules/term_permissions/term_permissions.module on line 215.
tid=343 is the taxonomy I try to block
valid for bot dev and official
MySQL 5.0.92
PHP 5.2.13
Drupal 6.20
Running TSS as well
Comment #29
jmrivero commentedOk, this is weird.
I just checked the $user->roles array and in some contexts, like when creating a new php page and printing the content of the array, it shows the literal name of the roles and their rid as the array key, but in the support tickets submit page where im using it, the values in the roles array are the rids, not their name.
So, in a php content page preview, the print_r of the $user->roles array shows this:
But in the support tickets creation page where i display the taxonomy terms it looks like this:
Those values are the actual role IDs.
Comment #30
Camario39 commentedThis thing was driving me nuts.
The function comments state:
* Given a term ID, determine if a user has access to that term. UID 1 is
* always allowed access. If no permissions are set on the term, allow
* access by default.
Therefore, my user is able to see all terms that are yet to be assigned an owner/user. Once I created other users and gave them term permission. They disappeared from the first user.
Hope this helps somebody.
Comment #31
fricupy commentedI changed the function term_permissions_allowed (line 212) this way
This did the trick for me :)
Comment #32
francescogiannico commentedHi , Sorry but I don't know how to apply the patch... :(
Comment #33
francescogiannico commentedI'm not able to apply this patch... can you help me please?
francesco
Comment #34
jmrivero commentedfrancesco, just find the function inside the module, copy this code and replace the one in the module with this, this is not a patch, you have to do it by hand.
Comment #35
druvision commentedThe issue still exists in 7.x - disabling the hierarchical select module made it work again
Comment #36
Orangefox Web Developers commentedWasnt working for me in drupal 7, changed the function 'term_permissions_allowed' to below and it works now, hope this helps someone.
Comment #37
ehanuise commentedSame pronblem here, no effet seen after install/config of taxonomy permissions.
Increasing the module weight in the 'system' table of the DB (from à to 10) solved the problem.
Comment #38
IWasBornToWin commentedI also had to change weight to 10 is system table, and then it worked.
Comment #39
Garvil commentedWhere can i change the weight ? In the system table i can't find where to change the weight ...
Comment #40
IWasBornToWin commentedYes, in system table, scroll to the right in the table...it's over there.
Comment #41
mgiffordWould be good to get a resolution to this set in code and into a stable release.
Comment #42
misc commentedPlaese make a patch and we get it into the module asap.
Comment #43
dshields commentedHere is a patch for what I found to be useful in #36
Comment #44
misc commentedRewrote the patch so it could be applied in the module directory, also removed some out commented stuff.
Comment #45
misc commentedAdded to latest dev.
Comment #47
aniebel commentedReopening because I have installed the DEV version and disabled the Hierarchial Select module, cleared cache, etc. and still have the same problem. To be clear, I have a vocabulary with about 50-60 terms. I changed the permissions on only 5 of those terms to allow Admin and one other role access. As anonymouse user, I can still navigate to the term path and view all items using that term.
Comment #48
roborn commentedNot a bug.
Taxonomy Term Permissions only works on Create/Update/Delete operations by design.