Workbench Access is a module that lets you control user content creation and editing permissions via taxonomy or menus.
I am trying to make IMCE use the sections created by Workbench Access the same way it uses Roles.
Currently I have it generating a form on the IMCE admin page of the vocabularies and terms that I am using as sections in Workbench Access. I can select what profile I want to use for the section, and set the weight if I desire. Unfortunately when I save my changes they don't get saved.
I am using Workbench Access 7.x-1.0-beta5 patched with http://drupal.org/node/1121124.
Attached are the two files I've created/ modified in IMCE.
So, what function actually saves the relationship between role and profile?
And where does it get saved to?
What do I need to do to save the relationship between section and profile?
Any screw ups in how I've coded things?
Anything else?
Comment | File | Size | Author |
---|---|---|---|
#5 | imce.admin_.inc_.workbench_access.inegration.diff.txt | 5.13 KB | jerrac |
#5 | imce.module.workbench_access.inegration.diff.txt | 2.71 KB | jerrac |
#5 | imce.workbench.inc_.txt | 2.77 KB | jerrac |
imce.workbench.inc_.txt | 3.33 KB | jerrac | |
imce.admin_.inc_.txt | 26.34 KB | jerrac |
Comments
Comment #1
jerrac CreditAttribution: jerrac commentedAh, solved it. I was variable_set'ing the wrong variable in imce_admin_submit.
Still would like feedback on my code.
Also, isn't there a way I could do this all in a custom module? So that I wouldn't have to modify IMCE core code.
Comment #2
ufku CreditAttribution: ufku commentedIMCE uses Drupal forms. You can try FormsAPI.
Comment #3
jerrac CreditAttribution: jerrac commentedForms API should work for the forms, I had thought about it, but not tried.
What about functions like imce_user_profile()? I had to modify that function.
Comment #4
jerrac CreditAttribution: jerrac commentedSpecifically, I had to add:
after:
in imce_user_profile().
Comment #5
jerrac CreditAttribution: jerrac commentedHere are the diff files for imce.module and imce.admin.inc. Also, a new file called imce.workbench.inc.
What works on my dev instance:
What I am working on, and would love help with:
Comment #6
ufku CreditAttribution: ufku commentedYou can run imce using a custom menu path, e.g workbench/imce. You just need to define the menu item and access callback similar to imce menu item. You can include imce.page.inc to use the functions defined in it.
Comment #7
jerrac CreditAttribution: jerrac commentedok, I have a custom admin page set up and working. Thanks for that tip.
Now, I'm trying to figure out how to get my access control logic into imce_user_profile(). Maybe I've just been staring at the code for too long, but I don't see how adding a custom menu item would help with that. Unless I wanted to totally override all the code in the function. I just want it to check variable_get('imce_workbench_sections_profiles') for access rights.
Thanks again!
Comment #8
ufku CreditAttribution: ufku commentedComment #9
nmillin CreditAttribution: nmillin commentedSo I know this is an old issue, but I created a module to solve this issue for me. Hopefully it helps someone else if they stumble across this old thread.
https://www.drupal.org/project/workbench_access_imce