EmployeePermissionTrait
Please have a look at the B2BContextTrait first.
Why is the EmployeePermissionTrait useful for your individual extension?
With the EmployeePermissionTrait you can easily check in your PHP code whether the logged-in employee has the required rights.
What are the possible functions:
Function | Description |
---|---|
| Check the permission of an employee:
Example code:
|
| Return of the EmployeeRoleEntity, if a role is stored accordingly. Example:
|
Note (Alert): You must always pass the SalesChannelContext as a parameter. How to use the trait, please see the B2BContextTrait.
Last updated