Hi!
I have a site with about 300 editors (more will register soon, so we can't assign the editors to sections by hand). Putting content in about 50 sections. Each editor belongs to exact one section and should only be able to create content in his or her section. If the editor registers he has also to chosse which section he belongs to. (After that there is a manual approvel proccess, which sets the editor active)
Is there a way to add the user automatically to the section (admin/config/workbench/access/editors/taxonomy/123) term with the same term (123) that has been attached to the user during registration?
I was thinking about doing it with rules and therefore working on #1285110: Add support for Rules, Actions, and Triggers to get this working again for having a start to add a rules action that will do this.
But maybe there is another way in workbench access I don't know and I am thinking to complicated. If so - please give me a hint how this could be done.
regards
marcus
Comments
Comment #1
agentrickardRun workbench_access_user_section_save() during hook_user_insert() and hook_user_update().
We don't currently support doing this directly.
Pseudo-code:
Comment #2
marcusx commentedAhh thanks! So my rules action does it the right way...
I will rework the rules action I am using now and add the $active stuff...
Comment #3
freddura commentedHello, I am wondering what progress you have made with this.
Comment #4
marcusx commented@freddura: Good question, I can't remember. The above code is working, so I left the $active check for now. But I can think again if you can specify in more detail what progress you would expect.
Comment #5
agentrickardTo be clear, this is custom module code that won't be integrated into the main module, since most sites don't tag user accounts.
Comment #6
agentrickardComment #7
delacosta456 commentedhi
i would like to suggest readers to be following this related issue https://www.drupal.org/node/1285110#comment-12338530that may help solve those , Automatic , contextual assignment etc. desired cases that may be achieved with Rules modules when it will be correctly integrated
Thanks