OG User Roles and File Upload
Note that this issue has been resolved with this setting: http://drupal.org/node/177948
There appears to be a problem using OG User Roles with the Drupal core upload.module.
There is NO problem if you assign users whom you wish to be able to upload files a site-wide role which has the "upload files" permission.
However, if you assign a user an OG user role which has the "upload files" permission, the user will be able to upload files, but will get an error in the process. This situation is described here: http://drupal.org/node/166557
The solution at this point is to replace the "Upload" module with the "Attachment" (http://www.drupal.org/project/attachment) module. There does not appear to be any permissions problems in using OG User Roles with the Attachment module.
We hope to resolve this situation and make OG User Roles fully compatible with the core Upload module. The issues to track:
- http://drupal.org/node/165723
- http://drupal.org/node/166557
- http://drupal.org/node/165737
- http://drupal.org/node/170524 (Drupal core update request)
Additional Notes: Clear the cache setting
We discovered that the file upload error occurs because of permissions that are cached by the user_access() function. Currently, there is no way in Drupal core to reset this cache. We have submitted a patch to do this here: http://drupal.org/node/170524
This patch, og_user_roles.user.module.5.2.patch is also included in the OG User Roles 2.3 release download tarball. We also have a new OGR setting: "Clear the cache".
With this patch to the user.module, and OG User Roles release 2.3 or higher, you can set the "Clear the cache" setting, and you should no longer receive the file upload error on file attaches by OG users. However, you should note that we now do the following each time a page is loaded:
- Delete the cache_menu record for the user
- Reset the user_access() cached permissions for the user
Obviously, this is going to add some overhead to your site. We are open to suggestions as to how we might fine tune these modifications to reduce this overhead.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion