Currently Beans use exclusively its own permission system (via bean_access) to check if a user has permissions to view/edit a bean. With the changes to OG and the ability to assign blocks/beans to groups it would be nice if beans honored OG group assignments and only allowed users to edit blocks within their own groups.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | bean-1264686-4-hook-access.patch | 3.49 KB | arithmetric |
| #3 | 1264686-bean-hook-access.patch | 2.16 KB | indytechcook |
| #1 | og_access.patch | 536 bytes | indytechcook |
Comments
Comment #1
indytechcook commentedPossible FIx. Please test
Comment #2
arithmetric commentedThis approach isn't sufficient to provide group-specific permissions for editing beans. Instead, I think the best course is to add a hook in bean_access to allow other modules to influence the access decision (like hook_node_access in node_access).
The OG-related code could be separated in a submodule. It would use the bean access hook to return an access decision and an OG hook to provide group-level permissions for creating, editing, deleting beans.
Comment #3
indytechcook commentedTry this patch with new hook_access
Comment #4
arithmetric commentedAwesome! Thanks for the patch indytechcook.
I've tested it, and made a few changes, including adding a new access callback function for the Bean add page (block/add).
Comment #5
arithmetric commentedI've committed this patch:
http://drupal.org/commitlog/commit/22232/5e01e981e945a3d457b506436fd81f4...