External administrator or editor authorization
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!
-
- Posts: 3
- Joined: 30 Sep 2023, 10:54
External administrator or editor authorization
Aimeos uses separate authorization! Can I grant permissions to a user or editor within a session! I created an external authorization and my user ID is stored in the session. So that you can assign a role to a session? Sorry, I'm using a translator)
Re: External administrator or editor authorization
Authorization is done by the access view helper and you can create your own class which queries external authorization sources:
https://github.com/aimeos/aimeos-base/b ... andard.php
Then, extend the context service class and overwrite the addAccess() method:
https://github.com/aimeos/aimeos-larave ... p#L92-L113
Finally, you have to register your new service class like done here in Laravel:
https://github.com/aimeos/aimeos-larave ... hp#L76-L98
https://github.com/aimeos/aimeos-base/b ... andard.php
Then, extend the context service class and overwrite the addAccess() method:
https://github.com/aimeos/aimeos-larave ... p#L92-L113
Finally, you have to register your new service class like done here in Laravel:
https://github.com/aimeos/aimeos-larave ... hp#L76-L98
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
-
- Posts: 3
- Joined: 30 Sep 2023, 10:54
Re: External administrator or editor authorization
Thanks, I'll try to do it
-
- Posts: 3
- Joined: 30 Sep 2023, 10:54
Re: External administrator or editor authorization
So as not to spoil the core! I want to inherit! Where do I need to place the file in the app folder? I understand I need to do extensionsaimeos wrote: ↑02 Oct 2023, 12:51 Authorization is done by the access view helper and you can create your own class which queries external authorization sources:
https://github.com/aimeos/aimeos-base/b ... andard.php
Then, extend the context service class and overwrite the addAccess() method:
https://github.com/aimeos/aimeos-larave ... p#L92-L113
Finally, you have to register your new service class like done here in Laravel:
https://github.com/aimeos/aimeos-larave ... hp#L76-L98
- Attachments
-
- doc_2023-10-16_09-23-07.png (82.8 KiB) Viewed 23853 times
Re: External administrator or editor authorization
The directory structure must match the PHP namespace of the class so it should be OK. Run "composer dump-autoload" to update the composer files in the vendor directory so it knows the new class.
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