Details
Description
Attempting to upload images using CKEditor in, eg. civimail, returns the following error:
> Sorry but we are not able to provide this at the moment.
> You must be logged in with proper permissions to edit, add, or delete uploaded images.
The issue lies in /sites/aba/sites/all/modules/civicrm/packages/kcfinder/integration/civicrm.php in the call to CRM_Utils_System::loadBootStrap() on line ~100.
This bootstrap is failing in Drupal 7 (possibly other CMS's too) as no user id or username/password is provided as an array in the first argument. The bootstrap is therefore failing to load a current user and, as a result, the permission check for 'access CiviCRM' is failing.
I haven't provided a patch as I'm unsure how CiviCRM expects to know who the current user is, and whether this is best fixed loadBootStrap() function itself, or in kcfinder.