Problem with set accesses on tabs in admin panel

Category: BUG FIX. Date publication: 15 June 2020

Hello! I found critical problem with work accesses in admin panel. This problem on 1.7.x versions Prestashop. I set access on tab in parent tab "More". Update page and see what access reseted.

In file classes/Profile.php in method findTabTypeInformationByAuthSlug i found this string

\'/ROLE_MOD_[A-Z]+_(?P<classname>[A-Z][A-Z0-9]*)_(?P<auth>[A-Z]+)/\'

I replaced on:

\'/ROLE_MOD_[A-Z]+_(?P<classname>[A-Z][A-Z0-9_]*)_(?P<auth>(CREATE|DELETE|READ|UPDATE)+)/\'

If you not found method findTabTypeInformationByAuthSlug, need find method generateAccessesArrayFromPermissions and find this string

\'/ROLE_MOD_[A-Z]+_(?P<classname>[A-Z][A-Z0-9]*)_[A-Z]+/\'

Replace this on:

\'/ROLE_MOD_[A-Z]+_(?P<classname>[A-Z][A-Z0-9_]*)_(CREATE|DELETE|READ|UPDATE)+/\'

After this manipulations you can see, what accesses now works. Thank you!

Leave a reply
Leave a comment can only registered users. By specifying an email, your name and the comment you pass a simple registration. On your specified email password will be sent from your account. If you already have an account then
No comments. But you can leave his by first.
Товары и услуги реализуются совместно с plentr