Hi there,

I can upload images using CKeditor and IMCE API but another administrator can't. They get an access denied page when they click browse server.


ufku’s picture

Category: bug » support

make sure you assigned an IMCE profile to admin role.

jonathanm’s picture

Status: Active » Closed (fixed)

Resolved. I feel quite silly. Thanks so much.

pfiliatreault’s picture

Status: Closed (fixed) » Active

It does not work for me. I assigned an IMCE profile to admin role, but users with administrator privileges get an acces denied message when trying to upload images.

Sergio.Tashdjian’s picture

Same for me, no way to make it work :(

Sergio.Tashdjian’s picture

Ok, a bit of research on the code showed me the reason of my problems.

Imce_access considers only the first user role to check which profile to use, and then it breaks the for loop, ignoring other roles.

So, you need to carefully set the weights on the role-profile asignments at the IMCE config, to let IMCE use the right profile for the user. Weight tells IMCE which of the user's roles you want to apply when a user has more than one role on your system.

The user i was testing had 2 roles: Administrator and Enrolee.
Enrolee had no profile selected on IMCE, and Administrator has a full access profile assigned.
But as Enrolee was first on the role-profile assignments, IMCE decided to use the setting for Enrolee and ignore the user was also an Administrator.

So , giving a smaller weight to the Administrator role-profile assignment told IMCE to consider a user with both roles mainly as an Administrator than an Enrolee.

  foreach ($roles_profiles as $rid => $role) {
    if (isset($user->roles[$rid])) {
      foreach ($role as $key => $pid) {
        if (substr($key, -4) == '_pid' && $pid) {
          return TRUE;

Hope this helps some of you.

Anonymous’s picture

#5 helped shed some light. I didn't need to give out the Admin IMCE permission to get it to work - just set the correct role access at siteurl.com/#overlay=admin/config/media/imce

R13ose’s picture

I saw how this needed to be, and this is so weird that you need to add profiles to all the accounts, or the bottom one has to have a profile before this works. Why can't you delete profiles or just say I want to use 1 not all of them?

Can we get this changes in the future as this doesn't seem like a way people would use this roles in IMCE?

GoalGorilla’s picture

Category: support » bug
Status: Active » Needs work

Changed the status

I see this as a bug as it is not clear for the end user how to configurate.

ufku’s picture

Priority: Major » Normal
Status: Needs work » Postponed (maintainer needs more info)

What's the bug here? How to reproduce?
Are you using 7.x-1.x-dev?

GoalGorilla’s picture

Status: Postponed (maintainer needs more info) » Needs work

Hey ufku, thanks for the quick response.

The bug is an user interface problem.

If you start on a clean drupal install and you configurate everything except the role weights, the imce module will not work for the users with those roles.

Are the weights needed?

ufku’s picture

Status: Needs work » Closed (works as designed)

As the description states, weights are needed for users with multiple roles. The configuration works as expected. Please try the latest dev and re-open the issue with a more descriptive bug report.

mariohernandez’s picture

Thank you for the information. This worked for me. Now I am able to insert images by browsing to the server.

sahmedia’s picture

use this link to the configuration
use admin/config/media/imce