digitalstate / platform-security-bundle
DigitalState Security Bundle
Installs: 149
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 1
Type:symfony-bundle
Requires
- php: >=5.6
- oro/platform: 2.0.*
- oro/platform-serialised-fields: 2.0.*
This package is not auto-updated.
Last update: 2024-12-21 21:03:19 UTC
README
The Security bundle extends the OroSecurityBundle and provides the developers additional core security functionality.
Table of Contents
Migration Extensions
This bundle introduces a convenient migration extension to help with loading yml-based acl data fixtures.
Example:
<?php namespace Gov\Bundle\DemoBundle\Migrations\Data\ORM; use Doctrine\Common\DataFixtures\AbstractFixture; use Ds\Bundle\UserBundle\Migration\Extension\AclExtensionAwareInterface; use Ds\Bundle\UserBundle\Migration\Extension\AclExtensionAwareTrait; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Doctrine\Common\Persistence\ObjectManager; class LoadAclData extends AbstractFixture implements AclExtensionAwareInterface, ContainerAwareInterface { use AclExtensionAwareTrait; use ContainerAwareTrait; public function load(ObjectManager $manager) { // Currently extensions are not automatically injected via the *AwareInterface. $this->setAclExtension($this->container->get('ds.security.migration.extension.acl')); // $resource = __DIR__.'/../../../Resources/data/acl.yml'; $this->aclExtension->import($resource, $manager); } }
acl: ROLE_CASE_MANAGER: Entity:DsCaseBundle:CaseEntity: [ VIEW_SYSTEM, CREATE_SYSTEM, EDIT_SYSTEM, DELETE_SYSTEM, ASSIGN_SYSTEM ] Entity:DsCaseStatusBundle:Status: [ VIEW_SYSTEM, CREATE_SYSTEM, EDIT_SYSTEM, DELETE_SYSTEM, ASSIGN_SYSTEM ]