new group privileges
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
- GülsümAkça
- Posts: 57
- Joined: 20 Nov 2020, 13:30
new group privileges
hello. I created a new group . I want the new group to see only the product and order panel. how can i do that? thank you
Re: new group privileges
Overwrite the permission configuration and add your group to the panels you want to allow:
- https://aimeos.org/docs/latest/admin/jq ... ermissions
- https://github.com/aimeos/ai-admin-jqad ... source.php
You must give the group acess to the dashboard too because it's the first panel that is shown.
- https://aimeos.org/docs/latest/admin/jq ... ermissions
- https://github.com/aimeos/ai-admin-jqad ... source.php
You must give the group acess to the dashboard too because it's the first panel that is shown.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
- GülsümAkça
- Posts: 57
- Joined: 20 Nov 2020, 13:30
Re: new group privileges
hello, except for what you said, it is necessary to write code in the config/shop.php file, otherwise it gives an authorize error (413).
Added and solved, thanks.
Added and solved, thanks.
Code: Select all
'roles' => [ 'editor' , 'admin' , 'mynewgroup' ]
Re: new group privileges
Hello and thanks for this guide so far.
I have two questions/problems.
I added to config/shop.php:
And i can an error (403) for this request in the dev console of the browser:
/admin/default/jsonadm
I tried to add to config/shop.php:
I have two questions/problems.
I added to config/shop.php:
- 'admin/jqadm/resource/dashboard/groups' => ['newgroup']
- 'admin/jqadm/resource/order/groups' => ['newgroup']
- 'roles' => ['editor', 'admin','newgroup']
And i can an error (403) for this request in the dev console of the browser:
/admin/default/jsonadm
I tried to add to config/shop.php:
- 'admin/jsonadm/resource/index/groups' => ['newgroup']
Re: new group privileges
Did you try to add all groups instead?nowrap wrote: ↑12 Jun 2023, 16:36 I added to config/shop.php:
- 'admin/jqadm/resource/dashboard/groups' => ['newgroup']
- 'admin/jqadm/resource/order/groups' => ['newgroup']
If i login to /admin with a test user the dashboard isn't shown as default. But i can access it manually with /admin/default/jqadm/search/dashboard. How can the dashboard be the first view after login?
- 'roles' => ['editor', 'admin','newgroup']
Code: Select all
['super', 'editor', 'admin','newgroup']
The JSON admin API is restricted to the configured groups for each endpoint. You need to make sure that your new group has access to all API endpoints that are used by the allowed panels. Here's the default configuration:
https://raw.githubusercontent.com/aimeo ... source.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: new group privileges
Thx for your reply.
I added the other groups to the config/shop.php but this doesn't change the behaviour to automatically navigate to the admin dashboard view. It opens the /profile page.
The request to /admin/default/jsonadm?locale=de is an options request. I tried to follow the source code to find the origin of the exception for the 403 response. It's the JsonadmController.php in method optionsAction:
https://github.com/aimeos/aimeos-larave ... r.php#L116
There the groups seems to be hardcoded?
For testing i added my new group. After this the request finishes. But i still have a lot of spinning icons. Only the newest orders are presented correctly.
Regards
nowrap
I added the other groups to the config/shop.php but this doesn't change the behaviour to automatically navigate to the admin dashboard view. It opens the /profile page.
The request to /admin/default/jsonadm?locale=de is an options request. I tried to follow the source code to find the origin of the exception for the 403 response. It's the JsonadmController.php in method optionsAction:
https://github.com/aimeos/aimeos-larave ... r.php#L116
There the groups seems to be hardcoded?
Code: Select all
$this->authorize( 'admin', [JsonadmController::class, ['admin', 'editor', 'api']] );
nowrap
Re: new group privileges
Yes, the fixed auth groups for the Laravel Jsonadm controller are a problem for adding new groups. We've already thought to make that configurable. Would that be sufficient to finally add new backend groups?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: new group privileges
For us we have only two wishes:
- option to configure which admin views are accasible for a new group
- set an admin page as standard view after login for a new group
Re: new group privileges
The Aimeos 2023.07.1 package released today contains two settings which allows you to configure the groups that are allowed to access the admin backend (incl. JSON admin API) and the default panel. In the ./config/shop.php use:
Code: Select all
'roles' => ['admin', 'editor', 'newgroup'],
'panel' => 'order',
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: new group privileges
Thx, alot!
Sorry for answering so late. So we have to upgrade from 2022.x to 2023.x first in order to use this improvement.
Sorry for answering so late. So we have to upgrade from 2022.x to 2023.x first in order to use this improvement.