You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#116522 Assigning File Directory Path by usertype in case of multiple usergroups for specific user

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Thursday, 18 April 2024 12:42 BST

Joris
Hi Ryan,

In the profile for our frontend users, we assigned the File Directory Path based on usertype (and we have a lot of different usertypes according to geographic locations). This is working very well, eg. users in the user group Brussels only have access to the folder /brussels and those in the group Antwerp to the folder /antwerp

Later on, while the site was in use for some years, we were asked to add an extra level of user groups for users who are in 2 user groups at the same time: a location (eg. Brussels) and a country level, eg. Belgium. We found out that the File Directory Path that is assigned to these users may vary: in some cases it is the location (brussels), in other cases it may be the country level (/belgium). However we need all users to have access only to the folder of their location (- user group); we do not want any folders on country level.

I also found out that the folder that is assigned, depends on which of the user groups was created first (has the lowest id): the location folder or the country folder.

Would there be a way to force the path assignment system only to select a location folder in this situation?

Kind regards, Frits

Ryan
I also found out that the folder that is assigned, depends on which of the user groups was created first (has the lowest id): the location folder or the country folder.

Would there be a way to force the path assignment system only to select a location folder in this situation?


Re-ordering the profiles so the profile using the location folder should work. Profiles are assigned in the order that they appear in the profiles list based on the Setup parameters, eg: device, component, usergroup, user.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

Joris

Hi Ryan,

Sorry for my late reply. Unfortunately I cannot solve it using your information.

Originally, the location and the country users shared the same JCE profile. I created two separate profiles and assigned them to the different parent user groups of the location and country user groups. I also made sure that the location profile is first in the list of JCE profiles.

However, if the country user group has a lower id  than the location user group, then the country user group is still determining the assignment of the image folder.

Because I assigned the JCE profiles to the user groups based on parent user groups, I also tried selecting the actual (child) user groups for both the location and the country. This did not change the behavior. Besides, the preferred assignment method for me would be the parent groups as we have lots of location user groups.

I also checked if I might misunderstand the profiles ordering (ascending / descending) and swapped their positions in the list, this made no difference either.

Kind regards, Frits

Ryan

Are you able to send me a login? - https://www.joomlacontenteditor.net/contact/site-login

If not, can you please export the profiles and attach them here as a zip file. I will try and re-create the scenario for testing.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.