Hi everyone
I use Taxonomy Access Control Lite module in my site and it really helps me but there is a problem which is important. Let me explain the problem with an example:
I have three users in my site: user1,user2, and user3.
I also have a vocabulary named voc1 which consists of three items: item1,item2, and item3.( A user can select multiple items of voc1).
I set the permissions with Taxonomy Access Control Lite as the following:
1- user1 can view and edit contents with the taxonomy item1.
2- user2 can view and edit contents with the taxonomy item2.
3- user3 can view and edit contents with the taxonomy item1, item2, and item3.
Now we can have the following scenario:
Step1: user3 create a page and select all three items (item1, item2, and item3). So at this time, all three users (user1,user2, and user3) can view and edit the page.
Step2: user2 edits the body of the page, he/she doesn't select or deselect any item from the list of voc1(as you know he/she can only see item2 in the list of voc1).
And here is the problem: if user2 save the page, item1 and item3 will be deselected automatically. So user1 won't be able to view or edit the page.
I am new to drupal, so please inform me if I couldn't explain my problem accurately.
I really appreciate for your help and attention. :)
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | term_visibility.diff | 2.99 KB | antgiant |
| #6 | term_visibility.diff | 2.96 KB | antgiant |
| #4 | term_visibility.diff | 2.9 KB | Dave Cohen |
Comments
Comment #1
Dave Cohen commentedI understand this problem. It's been reported in the past, and I've resolved it as "by design". What you're asking for, that tags which the user cannot see remain attached to a node, even after that user has edited the node... IMHO that would be more of a bug than the current behavior. I believe when a user submits that edit form, the content should reflect exactly what they submitted. There should not be secret tags which magically remain attached to the node.
However, I could see adding an option to each tac_lite scheme. Something like a checkbox labelled "hide all terms which user cannot view". The difference is... tac_lite will always hide nodes which the user cannot view, but we could make it optional whether tac_lite hides the terms. That is, your user would see all the terms in the node edit form, instead of what they see now, with some terms removed.
I hope I made that clear. Would that work in your case?
Comment #2
Farzaneh commentedThank you very much for your fast reply. You explain your belief and the solution clearly. ^__^
Let me explain the situation which I used this module.
I created a taxonomy to control users access to contents, so it is important that when a user view or edit a page, he/she can't see who else have permission to the page. At least a feature can be added which can specify "just the author of a page can modify the terms attached to the page" (I mean the terms which I configured to use with taxonomy access control lite).
I really need this feature and I hope you can help me.
Comment #3
Dave Cohen commentedIf I understand correctly, you want the node to be editable by many users, but only the original author can change the taxonomy. That's not something I'd support in tac_lite ('lite' means simple). But you could write a small hook_form_alter to hide the taxonomy field from non-authors.
Theres still the problem of tac_lite hiding some terms from some users...
Have you looked at the tac module. It came before tac_lite. It's more complex and might have something along the lines of what you want, maybe.
Comment #4
Dave Cohen commentedHere's the patch I'm considering to tac_lite.module.
With this patch applied, edit your scheme, unchecking the "term visibility" checkbox. Then tac_lite will not hide terms on the node form. And it's up to you to write your own hook_form_alter if you want to change what the user sees on that form.
Comment #5
Farzaneh commentedThanks a million for your help and suggestions. :) Your help is very valuable for me.
Comment #6
antgiant commentedI made two modifications to #4.
1. I renamed "Term Visibility" "Restrict Term Visibility".
2. I made it so checking "Restrict Term Visibility" still shows the terms you can view. The previous patch caused the checkbox to always override other tac_lite visibility settings.
I also wasn't sure if these two lines were accidentally included in this patch. (I left them in.)
Comment #7
antgiant commentedSo after further investigation I was wrong to make change number 2 (details below). Attached is an updated patch that only changes "Term Visibility" to "Restrict Term Visibility".
However, I think there is a bug in this code. We have two schemas one for viewing and a separate one for updating. Modifying the term visibility checkbox for the viewing schema appropriately changes the available terms when editing to either the limited set or the full set. However, if under the update schema I check the term visibility checkbox then when I edit a node no terms are listed at all. Not even terms that are selected on both the view and the update schemas.
Comment #8
soulfroysI have this problem too...
- A node have a term selected and this term have the permission "edit/delete" (seted by TAC-Lite) for the role "members".
- User A and UserB are both "members".
- User A edit a node and did not touch anything
- User B can no longer edit.
If I give "administer tac_lite" permission to the "members" role, then the User A and User can edit it normally (obviously).
Is there anything new about it? There are some combination of schemes to solve this?
[EDITED]
I just fix (newbie) my problem whith a custom module:
[EDITED V2]
The above code just works with Taxonomy Super Select (TSS), this works with Drupal core and TSS:
Comment #9
damienmckennaThank you for your contribution to this module. Support for Drupal 6 ended a decade ago, so I'm closing out this issue.