How to limit Access to control panel

  • Posts: 105
  • Thank you received: 2
8 years 1 month ago #252940

-- HikaShop version -- : 2.6.0
-- HikaMarket version -- : 1.6.7

Hello,

two questions :
1/ when a vendor is in the product creation page, the arrow on top left "retour" enable the vendor to go back (even if he didn't come from it) to the product listing and then if he clicks again on it he can go to control panel. I would like to avoid this, and potentially completely getting rid of this "back" button.
2/ in the control panel itself :
2.1/ I would like to hide the "customer" button ( I don't want the vendor to have any access to any customer vendor). how to do this?
2.2/ in the "orders" detail, how can I hide the information about the customer (name, email, adress,..)
regards

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 1 month ago #252955

Hi,

1 - To remove the "back" button, you have two possibilities.
You can use a "custom plugin" with the trigger "onHikamarketBeforeDisplayView(&$view)" and modify the $view->toolbar array.
You can also use a view override for the "toolbar / default" and modify the $data before his display.
The back button will be display using the key "cancel".

2 - The best would be to configure the ACL and to remove the access to the customers.
www.hikashop.com/support/documentation/2...l#tuto_configure_acl
You will also be able to remove the access to the customer on the order details (and it will impact other elements, like the email notifications).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 105
  • Thank you received: 2
8 years 1 month ago #253229

Hi,
I have successfully done the 1st modification, thanks.

for the second, I may have not understood. The only place where I saw a "customer" in ACL is in the order/edit/customer which I unchecked. But the button "customer" still appears in the cPanel.
I could actually make it disappear in an other way by modifying the view "cpanel" and putting a condition on the $btnName like this (on top of empty($btn), in line 19) :

if(empty($btn) or $btnName=='user')
continue;

however it seems to me pretty "rough"; could you (re)explain a better solution?

regards.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 1 month ago #253232

Hi,

You missed some ACL in HikaMarket.
Please have a closer look ; specially for the "user" ACL category.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 105
  • Thank you received: 2
8 years 4 weeks ago #253348

Ok, I could do it with using the "user" fields. I can't say that it was obvious that this "user" field would change the "customer" access in the cPanel. Maybe something to improve in the documentation?

Thank you.:)

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 4 weeks ago #253352

Hi,

Well, the internal name is "user" because it is related to the Joomla User and the HikaShop User table.
Afterwards, it has been called "customer" in HikaShop to avoid confusion with the Joomla interface.
Because the ACL are deeply link with the code and the internal structure ; if I rename it "customer" I know that it will generate unwanted side effects.

But yes, we plan to write a brand new documentation page for the ACL in HikaMarket ; I just need to finish some current work on HikaShop 3 before the release of the beta.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: rfonta

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

Moderators: Obsidev
Time to create page: 0.065 seconds
Powered by Kunena Forum