contextualcode / permissions-inheritance-bundle
eZ Platform bundle which allows to inherit user roles in legacy admin.
v1.0.3
2018-08-14 10:21 UTC
Requires
This package is not auto-updated.
Last update: 2024-12-18 17:22:36 UTC
README
eZ Platform bundle which allows to inherit user roles in legacy admin.
Installation
- Run
composer require
:
$ composer require contextualcode/permissions-inheritance-bundle
- Enable this bundle in
ezpublish/EzPublishKernel.php
file by adding next line inregisterBundles
method:
public function registerBundles()
{
$bundles = array(
...
new ContextualCode\PermissionsInheritanceBundle\ContextualCodePermissionsInheritanceBundle()
);
- Create new custom database tables:
$ cat vendor/contextualcode/permissions-inheritance-bundle/src/ContextualCode/PermissionsInheritanceBundle/ezpublish_legacy/cc_permissions_inheritance/sql/mysql/schema.sql | mysql -u <username -p<password> <database_name>
- Installs legacy extensions:
$ php ezpublish/console ezpublish:legacybundles:install_extensions --relative
- Regenerate eZ Publish Legacy autoloads:
$ php ezpublish/console ezpublish:legacy:script bin/php/ezpgenerateautoloads.php
- Done.
Usage
- Just open role view page in legacy admin. There will be new functionality to inherit the roles.
- Additional code need to be executed to assign inherited roles to the user. You can use custom login handler/event listener or any other way to call that code:
ccRoleInheritance::handleUserInheritedRoles(<user_id>);