Install the Permissions feature
Edit on GitHubThe Permissions feature is shipped with following modules:
MODULE | DESCRIPTION |
---|---|
Permission | Provides permissions support that can be used as a part of ACL / RBAC. |
PermissionExtension | Holds a set of plugin interfaces that can be used as extension points of the Permission module. |
To install the feature, follow the steps below:
- Install necessary modules using composer:
composer update "spryker/*" "spryker-shop/*"
composer require spryker/permission-extension:"^1.0.0" spryker/permission:"^1.0.0"
- Add plugins to Zed
CustomerDependencyProvider
:
MODULE | PLUGIN | DESCRIPTION | METHOD IN DEPENDENCY ROVIDER |
---|---|---|---|
CompanyRole | PermissionCustomerExpanderPlugin | Adds permissions to the company user. | getCustomerTransferExpanderPlugins |
CompanyUser | CustomerTransferCompanyUserExpanderPlugin | Adds company user information to customer transfer. | getCustomerTransferExpanderPlugins |
src/Pyz/Zed/Customer/CustomerDependencyProvider.php
namespace Pyz\Zed\Customer;
use Spryker\Zed\CompanyUser\Communication\Plugin\Customer\CustomerTransferCompanyUserExpanderPlugin;
use Spryker\Zed\CompanyRole\Communication\Plugin\PermissionCustomerExpanderPlugin;
use Spryker\Zed\Customer\CustomerDependencyProvider as SprykerCustomerDependencyProvider;
class CustomerDependencyProvider extends SprykerCustomerDependencyProvider
{
/**
* @return \Spryker\Zed\Customer\Dependency\Plugin\CustomerTransferExpanderPluginInterface[]
*/
protected function getCustomerTransferExpanderPlugins()
{
return [
new PermissionCustomerExpanderPlugin(),
new CustomerTransferCompanyUserExpanderPlugin()
];
}
}
- Synchronize permission plugins with storage:
Go to the Administration interface, Maintenance menu and click Sync permissions.
Thank you!
For submitting the form