Used d-4.5, test report in using this module Revision 1.34
After installing the module (applying patch to taxonomy.module, mysql table ). I created two categories with name Private and Public
2 nodes (image and poll) assigned to Private Category with 2 terms namely pv_term_1, pv_term2
2 nodes (personal blog entry and forum ) assigned to Public category with 2 terms namely pb_term1 and pb_term2
I applied category permissions (view, update, delete create) settings to two roles namely authenticated user and family as follows
Authenticated User :
Private : Default and two terms to Remove
Public : Default and two terms to Add
Family:
Private : Default and two terms to Add
Public : Default and two terms to Remove
Observed output:
Logged in as authenticated user, could able to see public with no terms for its 2 nodes( as mentioned above)
Logged in as family user, could able to see private with no terms for its 2 nodes (as mentioned above)
Desired output : Category with respective terms for assigned roles as per the category permissions
Would like to share tables entry, if required
| Comment | File | Size | Author |
|---|---|---|---|
| #25 | malfunct_happypirate[1].sql | 30.12 KB | malfunct |
| #23 | anonymous_unchecked.sql | 1.83 KB | Gunny-1 |
| #12 | taxonomy.module | 48.13 KB | Gunny-1 |
| #11 | respective_database_tables_anony_added.h | 2.34 KB | Gunny-1 |
| #1 | respective_database_tables.h | 2.34 KB | Gunny-1 |
Comments
Comment #1
Gunny-1 commentedI have attached entires of node_access, term_access, term_access_defaults and term_data
Comment #2
pyromanfo commentedFirst, your post is very confusing because I think you have the terminology confused.
Categories and Terms are the same thing. Categories go into Vocabularies. From your SQL, you have four categories going into two vocabularies.
With that out of the way, the second thing is that you don't have view permissions set for those categories, that's why they're not showing up. Even if someone has add/delete/whatever access, it's not going to be viewable when they don't have view permissions, that's the way it's supposed to work.
Comment #3
Gunny-1 commentedI forgot to this information in my first post, here it is
Would like to add that i enabled taxonomy_access from settings after (applying patch to taxonomy.module, mysql table )
Comment #4
pyromanfo commentedAlso I wanna say thanks for the database file, that helped alot.
Comment #5
Gunny-1 commentedSorry my terminology got screwed up.
I cross checked the user/configure/category permissions/{roles} the view is already enabled (checked) for the respective vocabularies and categories.
I think the entry is not getting inserted in to the table.
FYI, i have not checked the four permissions for uncategorized nodes.
Comment #6
pyromanfo commentedThat checkbox comes from the database, so I don't see how it could be getting checked.
For a specific example, try anonymous users (role 1) for pb_term1 or pb_term2, view shouldn't be checked in either place (as it's not set in the DB).
Comment #7
Gunny-1 commentederror in the path in my previous post
it should read, administer/users/configure/category permissions
Comment #8
Gunny-1 commentedOk, results for anonymous user
Default : Update, Delete, Create checked, view not checked
pb_term1 : Update, Delete, Create checked, view not checked
pb_term2: none of the permissions are checked
Comment #9
Gunny-1 commentedoops, i shall post the tables in couple of minutes
Comment #10
pyromanfo commentedSo the anonymous user shouldn't be seeing this category, because view isn't checked.
Without view, the user shouldn't even know the category is there.
Comment #11
Gunny-1 commentedi have enclosed the table details after updating the permissions for anonymous user.
well when i tried to enable the category block i got this error,
Call to undefined function: node_rewrite_sql() in modules/taxonomy.module on line 110
Comment #12
Gunny-1 commentedwell i can disable the category block by going to the database. But this error appears with the taxonomy_access patch applied to taxonomy.module
here is my taxonomy.module after applying the patch for taxonomy_access.module
Comment #13
pyromanfo commentedYeah that's not my code, that's a core function.
But are the categories showing up now that you have view enabled?
Comment #14
Gunny-1 commented>For a specific example, try anonymous users (role 1) for pb_term1 or pb_term2, view shouldn't be checked >in either place (as it's not set in the DB).
Test result after
Default : Update, Delete, Create checked, view not checked
pb_term1 : Update, Delete, Create checked, view not checked
when anonmyous user create's content for forum he can able to see the vocabulary public with no terms.
so i think the view is not working if i am right.
Comment #15
pyromanfo commentedNo that's entirely right. View isn't checked, so the anonymous user cannot see those categories. That's the way it's supposed to work.
Comment #16
Gunny-1 commentedyes, when i enable the view for anonymous user for pbterm1 the categories are showing up. Let me do some more testing
Comment #17
Gunny-1 commentedTesting completed, module working as desired.
Naming a vocabulary as "Private" i think it is taken as reserved key word?
Weird
It seems so, because when i enabled the view for Private still i couldnt get the category/term listed. Then i created additional vocabulary called Check and added a term check1.
The categories were showing up as desired.
Quotes disappeared (just got n/a in the place of quote) while i was testing the taxonomy_access for all the roles except super-user.
I inserted this in node_access table
INSERT INTO node_access VALUES (0, 0, 'all', 1, 0, 0);
now i got the quotes showing up for all the roles.
Can i have the above values in node_access table for taxonomy_access to work properly. I think this gets deleted when taxonomy_access is enabled through setting.
Comment #18
Gunny-1 commentedNo with this INSERT INTO node_access VALUES (0, 0, 'all', 1, 0, 0);
taxonomy_access.module doesnt work. i have to disable it to get it working. There may be many modules with this problem.
Is there a solution to change the permission settings in the quotes.module to get it work. This will be a generic solution for all other modules with the same problem.
Comment #19
pyromanfo commentedYes enabling the module removes that last bit of SQL you posted. Disabling the module inserts it. That's what it's supposed to do, override taxonomy_access or any other node based access.
Comment #20
(not verified) commentedI disabled the checkbox for all the permissions for anonymous user role but still the Check and public vocabularies are visible (in create content).
Desired output: The role should not view the vocabulary as all the permissions are unchecked
Comment #21
Gunny-1 commentedThe previous post was mine (forgot to login)
Comment #22
pyromanfo commentedCould you post the SQL again?
Comment #23
Gunny-1 commentedattached
Comment #24
Gunny-1 commentedI observed other problems (refer to #18 submitted by Gunny on February 9, 2005 - 15:18 at the bottom of the page)
user roles other than super user cannot see their blog postings in "my blog". By inserting this statement INSERT INTO node_access VALUES (0, 0, 'all', 1, 0, 0);
it solved the issue.
But i can't use the taxonomy_access now. This is a critical issue and so far i have encountered permission problems for quotes and blog modules may be other modules may have the same problem too. This happens only if taxonomy_access is installed as a result above entry gets deleted.
Comment #25
malfunct commentedI have an issue that I think is similar so I won't file a new report.
What I'm seeing is that when I'm logged out, none of the terms of the Employment vocabulary show. This is expected as anonymous user does not have view permission in the category.
However, when I log in as test_user, an authenticated user, he cannot see any terms under the Employment vocabulary either.
When someone who is a programmer_op role logs in, they can see the terms under the Employment category just fine as can the admin account.
I have no idea whats happening as when I look in the database permissions seem ok so all I can think of is somewhere authenticated users are getting taxonomy access based on the anonymous users settings, at least in some places as an authenticated user (so far as I know, it might have recently gotten messed up with a cvs version I loaded up) is able create nodes in the User Submissions vocabulary under the Submissions term.
I am attaching the relevant sql. The user table has been truncated and passwords cleaned up for obvious reasons.
Comment #26
carl ditzler commentedI'm interested in similar desired output: Category A is public, anonymous can access, and Cat B is private, anonymous can't access, I don't want public/anonymous to see Cat B even exists.
I turn navigation off for anonymous users, registered users enabled navigation.
When anonymous users go to category A, navigation is displayed, listing Cat B. Anonymous users can't access Cat B, but it is listed in navigation.
Understand navigation is separate from this module; the two are related. Ensuring privacy to some taxonomy would include not seeing that it exists?
Comment #27
pyromanfo commentedYes however that's the navigation module, we have no control over that. If navigation was using the taxonomy.module functions to find the terms it wouldn't be there, but it seems they're not so you'll have to ask them to add support for taxonomy_access.
Comment #28
Periastron@spreadfirefox.com commentedActually, it appears that taxonomy_get_tree should drop categories from the list if they don't have view permission; however, there appears to be a bug in taxonomy_access itself, which prevents it from getting the correct role IDs for a particular user. Specifically, this code in taxonomy_access:
should probably read:
When I make this change in the module, I can finally create a private forum that isn't even visible in the forum list, if the user doesn't have a role with the appropriate permission assigned for the forum.
Comment #29
pyromanfo commentedThanks! Commited to CVS. I was having a hard time figuring this one out. That should fix the original poster's problems.
Comment #30
Gunny-1 commentedNo, it doesnt fix the problem. When i check the view for a term under a category for anonymous user. The create content shows only the category and not the term.
Comment #31
pyromanfo commentedTerms and Categories are the same thing, what do you mean exactly?.
Comment #32
Gunny-1 commentedI am kinda getting screwed up with the terminology i meant vocabulary is still visible in the create content section even after disabling the view from category permissions.
Comment #33
pyromanfo commentedThat's not a bug, Taxonomy Access Control doesn't control access to vocabularies. Just Categories. So while the category isn't showing up, the vocabulary always will because TAC doesn't control that at all.
Comment #34
(not verified) commentedso we can add a vocabulary and terms to a role but can remove only terms and not vocabulary .
so if the admin adds more vocabularies to a role, and when he decides to strip the access to some of the vocabulary he is stuck. The vocabulary will be still visible to the user.
May be in the help file it can be mentioned that vocabulary once enabled for a role cannot be removed later.
is there a workaround ?
Well there is one more problem as mentioned here http://drupal.org/node/17095#comment-21525,
apart from admin other users cannot view their blogs they have posted in 'my blogs'. Can i post this as a separate bug?
Comment #35
Gunny-1 commentedthe previous comment was posted by me
Comment #36
pyromanfo commentedNo, you can't vocabularies either. This module does not control vocabularies. They are always shown. This module does not touch them.
Comment #37
pyromanfo commentedSorry, it should read "You can't add vocabularies either"
Comment #38
Gunny-1 commentedwell, here is another test case,
consider there are two categories with sub-categories for a vocabulary
if i enable all the permissions first category and select add (similarly for remove) then submit.
both the categories and sub categories are selected.
desired output: only first category should be selected.
this happens only when i select add and submit and if i dont select add (with checkbox enabled for the category) and just press submit, its fine.
Comment #39
Gunny-1 commentedplease comment on this too,
http://drupal.org/node/17095#comment-21525,
thanks
Comment #40
malfunct commentedThe issue I was seeing was fixed in the most recent CVS verstion. Sorry it took me so long to try it out.
Comment #41
keve commented