Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comments
Comment #1
ufku CreditAttribution: ufku commentedmake sure you assigned an IMCE profile to admin role.
Comment #2
jonathanm CreditAttribution: jonathanm commentedResolved. I feel quite silly. Thanks so much.
Comment #3
pfiliatreault CreditAttribution: pfiliatreault commentedIt 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.
Comment #4
Sergio.Tashdjian CreditAttribution: Sergio.Tashdjian commentedSame for me, no way to make it work :(
Comment #5
Sergio.Tashdjian CreditAttribution: Sergio.Tashdjian commentedOk, 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.
Hope this helps some of you.
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commented#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
Comment #7
R13ose CreditAttribution: R13ose commentedI 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?
Comment #8
Open Social CreditAttribution: Open Social commentedChanged the status
I see this as a bug as it is not clear for the end user how to configurate.
Comment #9
ufku CreditAttribution: ufku commentedWhat's the bug here? How to reproduce?
Are you using 7.x-1.x-dev?
Comment #10
Open Social CreditAttribution: Open Social commentedHey 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?
Comment #11
ufku CreditAttribution: ufku commentedAs 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.
Comment #12
mariohernandez CreditAttribution: mariohernandez commentedThank you for the information. This worked for me. Now I am able to insert images by browsing to the server.
Comment #13
sabdeladhim CreditAttribution: sabdeladhim commenteduse this link to the configuration
use admin/config/media/imce
Comment #14
tuthanh CreditAttribution: tuthanh commented#13 is right.
Go to /admin/config/media/imce and select User-1 for administrator profile.