ACL with 1.5.3 not working correctly

  • Posts: 202
  • Thank you received: 2
13 years 3 months ago #22649

The other day, I upgraded to 1.5.3 in order to fix an issue with the Category Search function. This latest version of HikaShop (1.5.3) seems to not be handling the Joomla ACL in the same way it did prior. I have the following user groups in Joomla (version 1.6.5):

Distributors
--Company 1
--Company 2
--Company 3
Suppliers
--Supplier 1
--Supplier 2
--Supplier 3

Within HikaShop, I have the following categories:

Company Images
--Company 1
--Company 2
--Company 3
Supplier 1
Supplier 2
Supplier 3

An end user can be a member of only one Distributor user group (for example, Company 1), and can be members of any number of Supplier user groups (for example, Supplier 1 and Supplier 3). However, the users are not placed as members of the Distributors user group. Within HikaShop, each company is granted access to their company images by assigning their company Joomla user group to that HikaShop category (example, Distributors>Company 1 = Company Images>Company 1). That worked perfect until this upgrade. Now, it seems, HikaShop will not respect the ACL as I have had it working, and will not display the Company Images any longer. If I add the user to the Joomla user group Distributors, HikaShop will then display their subcategory properly. As the Joomla user group for each Distributor is a higher level than the Distributor group, I would expect the Company user group to inherit rights.

I hope this all makes sense!!

The site can be found at:
www.thegragroup.com/storefront

Thanks!
Rick

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
13 years 3 months ago #22660

Indeed, we changed that so that you can have a more fine grained definition of ACLs which was not possible if we were to inherit parent accesses and some users needed to do that.

As you say, you can easily have it working the way it was before by either adding the user to the parent group or adding the sub groups in the ACLs in Hikashop instead of just the main group.

Nevertheless, if you want to quickly go back to the previous behavior, you can edit the file administrator/components/com_hikashop/helpers/helper.php and change the lines:
$userGroups = JAccess::getGroupsByUser($my->id, false);

by:
$userGroups = JAccess::getGroupsByUser($my->id, true);

On our end, we'll look at adding an option in the configuration so that you can choose the behavior of the system.

Please Log in or Create an account to join the conversation.

  • Posts: 202
  • Thank you received: 2
13 years 3 months ago #22662

No problem, and I understand why you made the change. I am just happy it wasn't something I screwed up!!!

I will add my users to the parent user group as well, as the main purpose of this site is HikaShop, so I will keep to the paradigm you all are using.

Thanks for the assistance!!!

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum