I'm trying to upload a file in a comment, but when I click attach, IE will show a JS error.

In Drupal logs, I see an "Access Denied" error on comment_upload/js.

I tried uploading the file as admin user and it worked, so seems like a permission issue. The user I'm having problems with has access comments/post comments and upload files permission granted.

What permissions are needed for a user to upload files to comments?

Comments

tborrome’s picture

Category: support » feature

Figured out the cause - I only configure upload files permission for group membership (through og_user_roles). Looks like I need to grant upload files permission system-wide to get comment upload to work. Problem with this is that all users are able to upload files to comments site-wide. I need comment upload functionality only available to certain roles within groups.

Better to have a specific permission for "upload file to comments" that I can set at the group level.
Turning this into an enhancement request for this needed functionality.

ultimateboy’s picture

Title: Permission issue on comment upload » Integration with og_user_roles
Version: 5.x-0.1 » 6.x-1.x-dev

Currently, comment_upload does not work if a user only has permissions to upload via a group-specific role. But I could not tell you if this is an issue with comment_upload or og_user_roles, please move the issue accordingly. But to work around this issue in the mean time, you must assign a global role which has the "upload files to comments" perm. I will keep this as a feature request, as it is integration with another module.

sun’s picture

Project: Comment Upload » OG User Roles

Moving to OG User Roles.

somebodysysop’s picture

Title: Integration with og_user_roles » Integration with comment_upload
Assigned: Unassigned » somebodysysop
Status: Active » Fixed

This is an OGUR issue. When comment_upload processes a file attachment, it makes a call to /comment-upload/js which is outside of group context. Group roles are only valid within group context. Needed to modify OGUR to maintain group context when this call is made.

Submitted code changes to CVS. Should be available for download in .dev release in about 12 hours from now.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.