Page 1 of 1

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

Posted: 12 Sep 2019, 12:04
by rasch
Hi,
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.

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

Posted: 13 Sep 2019, 09:13
by aimeos
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.