Hey all,
This support request is for documentation because I’m trying to figure out if Workflow has the functionality I’m looking for.
Background:
We have a category called Departments with several taxonomy terms inside. The easiest example is a news site with departments like sports, business, and local news.
Problem:
If we grant the revert revisions/publish permission to any role, they can publish all content. A sports writer can publish a business writer’s content.
The goal:
For a sports writer to only be allowed to publish content types that are flagged with the taxonomy term sports.
What we want to know:
If workflow module is capable of segmenting permissions based on Taxonomy terms, and if not how can I accomplish this goal.
Thank you
~Cameron
Comments
Comment #1
jvandyk commentedYou could do this by creating workflow states, but it seems a bit of an awkward fit. A better solution might be a taxonomy access control module such as
http://drupal.org/project/tac_lite
http://drupal.org/project/taxonomy_access
Comment #2
camkruse commentedIf this is possible to do through Workflow I would love to get some more pointers on how to setup the configuration. I can't seem to find a taxonomy based area, only limited triggers.
TAC and TAC_lite don't appear to be a solution. They only provide ability to view, update(edit), delete, create, and list. The revert revision privilege is granted outside of this module.
Comment #3
jerusalemLeo commentedI'm also looking for a way to do something like this.
Taxonomy Role is helpful in doing one thing: When creating content, it will allow selecting terms that you are authorized for. So the sports person will only get taxonomy he/she is authorized for.
http://drupal.org/project/taxonomy_role
The second problem that I'm looking to solve is how can the workflow be based on the term selected?
So, if a Sports author is submitting content type News, the author will only be able to tag it with sports-related Taxonomy (e.g., Sports: Basketball or Sports:Tennis, etc.). Now the workflow should consider to send an email to the Sports Editor (as opposed to the Entertainment editor).
Similarly, if an Entertainment author is submitting content type News, the author will only be able to tag it with entertainment-related Taxonomy (e.g., Entertainment: Box Office or Entertainment:Night Life, etc.). Now the workflow should consider to send an email to the Entertainment Editor (as opposed to the Sports editor).
Ideas are greatly appreciated.
Thanx.
Comment #4
brian_c commentedIf it is possible for you to create a different Content-Type for each different article type, you might be able to accomplish this "out of the box" using the Revisionary module: http://drupal.org/project/revisionary
If this is not an option, you're probably going to have to figure out a way of implementing the permission check(s) yourself in a custom module. Again, Revisionary may help you here; figure out how they're doing it based on content-type, and modify it to work based on taxonomy instead.
Comment #5
camkruse commentedI agree, this is achievable by creating content types for each taxonomy term.
Example, Sports Page, Sports Story, Business Page, Business Story.
However, this become very challenging for a site that is already build.
Each node would have to be converted to the corresponding content type.
Also, the combination numbers grow quickly. My site currently has 19 taxonomy terms and 15 content types; managing 285 content types doesn't sound appealing.
Which is why having a taxonomy influenced workflow would greatly help.
Any ideas?
Comment #6
hillaryneaf commentedI too would love to have this functionality... subscribing
Comment #7
cam_pdx commentedI'd appreciate any feedback on this scenario:
I have a company intranet site where I’ve created a Category taxonomy. Every new node is classified to a category (which amounts to a content hierarchy). My workflow will be multi-step, with content owner reviewing first, then the communications manager reviewing for messaging, and finally myself reviewing that all the Drupal settings are appropriate (hopefully this step goes away). So, the content owner/expert changes depending on what section (Category taxonomy) of the site the content is assigned to. For purposes of routing new nodes (or edited nodes) to the appropriate content owner/expert for review, I was thinking it would be useful if I could assign a username to each category term. Then, when content is added/updated, the node would be routed to the correct person for review based on the category selected.
If anyone has any suggestions on how to accomplish this, I very much appreciate your thoughts.
Cam
Comment #8
rdeboerTo all the above...
Our customer, a university running a web site with many contributing authors and publishers, was dealing with very much the same issues.
To address them I first tried various existing modules, but none were very satisfactory. So I wrote a new module, Revisioning, which I feel could satisfy most of your needs.
Be the first to try it!
It comes with 3 very detailed step-by-step tutorials (links are on the Revisioning project page).
Good luck and I look forward to your feedback!
Comment #9
Leeteq commentedAnd: http://drupal.org/project/module_grants
Comment #10
vb1 commentedGreat documentation and looks good RdeBoer! Might be exactly what I need. Will test out Revisioning + Module Grants + Workflow + TAC combo (-AND-ing access grants rather than -OR-ing is a must for my project). Anyone already using this combination?
Comment #11
groovehunter commentedI have got a smilar task todo
http://stackoverflow.com/questions/2447092/drupal-workflow-action-access...
I would like to have users with roles (dep1 + editor), (dep2 + editor) and then analogue (dep1+ publisher) and so on.
For now it looks like i need dep1-editor, dep2-editor .... dep1-publisher.... etc... so for our 20 departments we would end up with 40 roles. Not that nice... but at least it would work i suspect.
Comment #12
frankiedesign commentedHmm.. I managed to do the desired functionality with TAC.
It was a bit of a struggle figuring out what to tick where... but at the end it was like that:
There is a vocabulary "resort" which contains terms like "sports", "baseball", "basketball", "business", "local news" all available to content type "Article". Someone with the role "Sportsreporter" can create content of type "Article" where there is a select field for the taxonomy, which only contains "sports", "baseball" and "basketball" ... and NOT "business" or "local news". A user with role "Businessreporter" has only available "business" in that taxonomy list, and so on. Of course, once a node is created, the edit permission stays with the roles assigned to the terms. (An admin could change term "sports" to "local news", and then all "Sportsreporter" would be unable to edit that node anymore.)
Works fine here. Of course: without moderation or version management.
If you want to have the content in moderation, then that's possible too ... if you have a all resorts moderator. Having different sports moderators or business moderators publishing the created unpublished versions of the reporters is not possible like that, I think.
Another thing I did not figure out is how to let articles with term "sports" be created and published WITHOUT moderation, but articles with term "business" only WITH moderation... I'm still trying to do that...
So long...
Comment #13
kiwad commentedUse case scenario :
A complex workflow. Each node going though the workflow is associated with one of the 200 terms in the taxonomy. A moderator for each term. Actually, the way to do it would be creating 200 roles and using tac_lite to grant or restrict access. Doing it with rules would simply need a validation when a content in a specific state is going to be viewed... BUT I'm stuck at linking term to its moderator and generate a token from this...
I'm not trying to select a taxonomy for the user (user term, profile taxonomy, content profile) but to select a user to be associated to a term and then be able to use the token in rules.
With term fields I could do this by adding a field that would be the UID or the email address, but it's obviously not a great way of doing it....
With NAT, I could do it using CCK user reference, but then the token is associated to the node from NAT, not the term...
So, would their be any way to use CCK user reference with a term and grab this reference with rules to grant/restrict access ?
Comment #14
kiwad commentedGoing one step further...
I have a Vocabulary "Domain"
With taxonomy_node, I create a content type "domain" in which I can use CCK user reference to link my term to a specific Moderator
With content_taxonomy, I add a term to the content-type that needs to go through a workflow
With token_custom, I'm creating a node token which I'll use in rules
This code echoes the UID of the moderator for the term . Then, I'm able to validate with rules that when a node of a specific type is in a specific state is going to be viewed, if [node:toke_custom_moderator_domain]!=[user:uid] then do a Page redirect and Show a message " You don't have access".
This way, I don't need to create a role for each domain-moderator, but only for "moderator" ... one role instead of 200 seems a lot more manageable to me ;)
Hopefully, this might help others...
Comment #15
kiwad commentedI keep working on this...
I would now need an event "If content is going to be edited"
Will track this : http://drupal.org/node/762450
Comment #16
kiwad commentedAnd if you want to display a view filtered for current user, assuming you have already filtered by content-type and workflow state, and limited access to the view only for the role "moderator", this PHP code (viewsphpfilter) (which needs a bit of clean up and validation) might help :
Comment #17
Bastlynn commentedSince this request is over a year old, I'm going to assume a solution was found or you've moved on. If not, please get updated to the latest versions of all modules and make a request for it against Drupal 7 if the problem is still there and I'll be glad to take a look at it.
Comment #18
johnvITMT, in version 7.x.2.x, a new hook_..._alter() is introduced, where you can change the premitted transitions.
For example, you can limit the permitted transitions according to the user's profile.
See workflow.api.php for details.