Avoid Exception 'Not allowed to access JQAdm "customer" client'

Questions around the Aimeos bundle for the Symfony framework
Forum rules
Always add your Symfony, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Posts: 16
Joined: 02 Sep 2019, 11:51

Avoid Exception 'Not allowed to access JQAdm "customer" client'

Post by rasch » 12 Sep 2019, 12:04

I have logged in with the role administrator in the backend and then assigned the role editor. After saving, the backend will reload according to my new role editor. Then I created a new role via the groups form, which has no admin rights. But when I assign this new role via the user form, I get the following ecxeption: Not allowed to access JQAdm "dashboard" client in ext/ai-admin-jqadm/admin/jqadm/src/Admin/JQAdm.php (line 52)

Code: Select all

if( $view->access( $config->get( 'admin/jqadm/resource/' . $path . '/groups', [] ) ) !== true ) {
            throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Not allowed to access JQAdm "%1$s" client', $path ) );
But in such a case, I would rather be logged out and forwarded to the login page. How can I best implement this behavior in Aimeos?

Thank your for your help.

User avatar
Posts: 3621
Joined: 01 Jan 1970, 00:00

Re: Avoid Exception 'Not allowed to access JQAdm "customer" client'

Post by aimeos » 13 Sep 2019, 09:13

The Symfony roles and Aimeos groups are two distinct concepts. Each admin and editor has the role ROLE_ADMIN but to be able to log into the admin interface but they have different Aimeos groups.

If editors remove their own group, they still have the ROLE_ADMIN but don't have access to the panels any more. You could try to remove the ROLE_ADMIN as well but I would rather leave this as is.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply