the node create access check should use node_access rather than user_access (so it works with custom node type modules that implement their own permissions)
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | mail2og-fixes_create_permission_check-965200-2.patch | 817 bytes | elplatt |
| mail2og-node-access.patch | 785 bytes | mfb |
Comments
Comment #1
rumburak commentedI did not try personally the patch above, but I encountered an error in node_access. Practically the node_access function returns ALWAYS false for the create operation, even if the user has the permissions to create the node of the specified content. This is at least the case for content type created with CCK... The only case the function returns TRUE is if the user has the "administer nodes" permission. Possibly a problem of the CCK/drupal???
Comment #2
elplatt commentednode_access() was replaced with user_access() in 8d52b4f8. I'm having a related problem, namely that non-cck defined types (such as blog) do not follow the 'create foo content' pattern for permissions. The best solution would be to fix cck to respond correctly to user_access('create'), but that might not be practical. I propose combining both access functions. It potentially checks two separate permissions (ick!) but the user will not be able to post unless one of those permissions has been enabled, so I think it should be fine as a practical solution for now. Patch submitted.
Comment #3
jludwig commentedThis module is unsupported now, but I went ahead and committed this into the latest 6-1.x branch since I was there anyway. It looks good. Thanks.