Hi All,
So far I've managed to get Drupal to do everything I want apart from a proper access control scheme. In a nutshell, I need to associate content to roles, then restrict editing and deletion to the associated role.
I have a number of custom Content Types. All roles need to be able to create these content types. But once created their editing and deletion, must be limited to the role with which the content was initially created.
I've tried a number of different access control modules (content_access, nodeaccess, taxonomy_access, taxonomy_role). None of them seem to achieve what I want. Taxonomy access comes close, but the problem is the assignment of vocab terms (which links to a role) on content creation. At the moment all terms are listed, which effectively allows a user to assign new content to any role.
For taxonomy access to work (the way I want it), I need a way of automatically assigning a vocab term on creation of content based on the user's roles.
This issue is really holding me back.
- Have I missed a module that will achieve this approach?
- Is taxonomy_access the way to go, can it be adjusted to do what I need?
- Am I going to have to write my own module?
Thanks
Andy
Comments
Andy: You might want to take
Andy:
You might want to take a look at the Organizational Infrastructure module, http://drupal.org/project/oi. I was considering this module for a roughly similar need, though I haven't actually tried it out yet. Unfortunately, this module doesn't appear to have much documentation, nor is there much recent activity.
If you are considering writing your own module, this might be something you can build on.
--
Joe Kyle
--jjkd--
(no title)
Hmm... your approach might work, but not with the available modules.
You would need a module similar to taxonomy_defaults (which assigns a predefined category to a content type), but with the category calculated from one of the author's roles.
Additionally, because a user's roles are designed to be an array of roles which add permissions, your module should have the option to specify which role matters.
Generally the approach seems a bit unnatural but it might work. Have you investigated any solutions using og?
-----
Oops. I just thought that the taxonomy_defaults module might do as it is, if each content type corresponds to one role's category.
Joe, thanks for the pointer,
Joe, thanks for the pointer, I'll take a look at the module.
cog.rusty, I didn't know about the taxonomy_defaults. That might help, I'll take a look. Could you expand on your comment about my suggested approach not being that natural. At this stage, I'm quite happy to get any suggestion that might help.
(no title)
Not much. I just felt that to allow a group of users edit a content type by going through a roles taxonomy was a rather roundabout way. But if there is no shorter route available, that should do.