Is it possible to give some special user ability to approve (publish/unpublish/modify/delete) only SOME pages, according to taxonomy?
I mean: I've some document, categorized through taxonomy, let's say one vocabulary "topic" and several terms inside: topics_1, topics_2, topics_3, etc - Each page falls in one of these terms.
I want to create a special account, the "supervisor1", who should be able to approve only pages of "topics_1", not of topics 2/3.
I should also have one "supervisor2" --> able to approve/ect only pages of the "topics_2" category... etc. etc.
I tried using taxonomy_access to allow full access to only one category, but no success:
- if "admin nodes" privilege is on for that user (role), admin/nodes gives a complete list of all documents - user can modify/publish/unpublish ANY document.
- if "admin nodes" privilege is off, I've a "accessy deny" error on the admin/node page.
Who can please help me?
Comments
as far as I know that's not
as far as I know that's not possible at the moment due to the way node access modules work - i.e. you'd need to have administer nodes enabled for those users, but that would override node access control from something like the taxonomy access control module.
Another way to do it, would be to either
1. duplicate the "page" or "story" modules - then extend the permissions to add update/delete permissions to them
2. install the CCK module and use that to add extra content types.
You could then apply different vocabularies to each term, or use views.module to create article displays by content type instead of/as well as taxonomy.
Ouch!
>as far as I know that's not possible at the moment
Ouch! :-) too bad, it's the first real "lack" I find in Drupal.
BTW I already use different content types - I use flexinode, not cck, but should be the same. This didn't help me in the "limited approval" task... or I cant understand how it could.
Anyway: your suggesting about using "views" could be a good workaround for me: I will try creating, for example, a new view: "Admin/topic1" to manage only documents of topic_1, "Admin/topic2" for only documentd of topic_2... should only find a way to present the proper menu/block to the right users... I'll work on it :-)
Thank you!
Views helped!
I tried it, and it worked. Not a solution, but a good (for my needings) workaround. Here's what I did:
- I created a new view, using views module, with page support, url "admin/topic1", which display only nodes in moderation queue of "topic1" documents (I could do it playing with filters), providing access only for a given "supervisor" role
- I did the same providing a block support for topic1's documents only; I added a "more" link in the footer linking to admin/topic1
- I used the "php visibility" feature to display the new block "topic1" only for users of "supervisor" role, user nr. X
- I replicated the same structure for topic2 (user Y), topic3 (user Z).. etc (I've 5 main topics).
So now, when user X logs in, a block "approve nodes of topic 1" appears for he only. He can view and approve any single "topic1" document in the moderation queue. When user Y logs in, he has a "approve nodes of topic 2".. and so on.
Of course, all users of the "supervisor" role can still manage all the content through the "content" and "content-types" menu - and it's not good. But if it cannot be done.. it cannot be done! :-) Would be nice at least to "hide" these menu items... how can I "hide" some menu for given users? Any idea?
another thing you could
another thing you could try:
use views to override taxonomy/your front page etc., and filter by "moderation: no" - that way anything in moderation won't display.
Then install the content moderator module - which allows people without the "administer nodes" to put nodes in and out of moderation.
Then keep your existing views, but take "administer nodes" away from those editors, then the administer content menu won't appear for them, but they'll still be able to review and approve the posts.
Hmm, not sure if that'll work, because content moderation relies on a page with all content to be moderated and you may not be able to override that per role, might be worth a try though.
and another
I think the actions and workflow modules tried to deal with this - and remember a blog post by merlinofchaos (on his blog, don't have url to hand) which dealt with ways of setting it up. Might be worth looking into it but I've not tried myself.
Another quick workaround would be to restrict the navigation/admin menu to an "admin" user group - and make a new menu/s for everyone else with what they need in it. Then they can still manually browse to /admin/content - but no menu entry.
Thanks! :-)
> Another quick workaround would be to restrict the navigation/admin menu to an "admin" user group
Yes I followed that way and its, I think, enough for me. The suggestion with "moderation: no" in views is interesting - I should try it :-)
And the workflow module also...!
catch, really thanks for your help.
Using vote up/down
I did this using vote up/down....
1) You can build lists of nodes filtered by taxonomy term and then assign eac view to a single role like you did. With views: moderation: yes, taxonomy: your choice...
2) then with the actions and voting actions (and voting API if course) module you can say that any node who gets a single vote up gets out of moderation right away...
3) Your content type is set to go to moderation right away on creation in the default content type settings.
there you go, no need to give the administer nodes right, and now users can approve posts!
Hope this helps you!
patchak
Some update
I found that my previous approach (views and blocks) didnt work as I expected - people with "administer nodes" were still able to watch any document - including some "private" document. Then I tried with "content moderator" - but something didnt work. So i tried with the new "modr8" - was better but still unable to respect taxonomy_access rules. OK - then I tried patching "modr8" to fit my needing - and was again better.
Now I realize that when document is not "published", it is not visible to people without the "administer nodes" ... so I wonder: can someone suggest how to permit people in a specific role to VIEW not-published nodes without granting them the "administer nodes" ? Is there a way to write a module/function/something to bypass drupal's node view standard functions?
use views??
Why don't use views to do it??? I'm not sure but I guess if you give access to a specific role to a vie , I guess they will be able to see the nodes even if they are unpublished...
worth a try
eh yes
yes, view of course worked :-) silly me. :-)
tnx