Error signing in as admin user with limited permissions

Hi,
Since I have problems with securing the webshop (csp security) I added a new user (as normal administrator) in Admin panel and gave almost all permissions to it so the user IBBoard can check what's going on. But if he or I log in the admin panel using this new user, then the new page opens with the error:

Warning: Undefined array key "docs" in ~/admin/index.php (Line 36)
Fatal error: in_array(): Argument #2 ($haystack) must be of type array, null given in ~/admin/index.php (Line 36)

instead of classic admin panel. What can I do? Btw, AdminStuff is subpage for the Admin panel.

Btw, the store was installed using Softaculous installation.

Best regards,
Goran

tim

What are the permissions set?

Hi Tim,
in users, edit the (new) user.

tim

Yes, that's where they are. But what are they? Can you reproduce this problem in the demo? demo.litecart.net

Hi Tim, unfortunately I can't. First of all "This feature is not available in demo" and secondly, there are far less permissions available.

tim

Ok show a screendump of what your permission settings are to better understand what you have there.

Here is comparison of user permissions between my webshop and demo shop. There are far more permissions in my webshop than in demo.

tim

Ok, so no subpages were selected. Do one at minimum for each enabled app. We could add a warning during save to be more clear about this.

I see... I thought that click on eg. Modules means that all subpages are enabled as well. Maybe You could update code that clicking on each page would check/uncheck all subpages and then warnings are not needed.

tim

Hmm.. When I click on an app like modules it automatically selects all underlying options. This is done by javascript and the part that it doesn't do that for you suggests there can be a javascript error in your F12 console. Can you have a look?

Tim, I am not familiar with HTM/PHP development so although I use FireFox, I am not sure where to look. But I can say that disabling IBBoard mod fixed the problem. When enabled I have to click on each item, when disabled, then clicking on an app enables/disables all modules.

tim

Ok, it sounds like you addressed the problem to CSP blocking javascript from doing it's thing.

Bekijk de code op GitHub