Skip to content
Snippets Groups Projects
Commit db2882cd authored by Frank Morgner's avatar Frank Morgner
Browse files

refs #14448 - bugfixin configuration of namespacing at permissions/roles

* zf3 refactoring of namespacing of extra permission methods at finc module
* adds updated composer.lock
parent f9ebfb79
No related merge requests found
This diff is collapsed.
...@@ -155,11 +155,22 @@ $config = [ ...@@ -155,11 +155,22 @@ $config = [
'zfc_rbac' => [ 'zfc_rbac' => [
'vufind_permission_provider_manager' => [ 'vufind_permission_provider_manager' => [
'factories' => [ 'factories' => [
'catUserType' => 'finc\Role\PermissionProvider\Factory::getCatUserType', //'catUserType' => 'finc\Role\PermissionProvider\Factory::getCatUserType',
'ipRangeFoFor' => 'finc\Role\PermissionProvider\Factory::getIpRangeFoFor', //'ipRangeFoFor' => 'finc\Role\PermissionProvider\Factory::getIpRangeFoFor',
'ipRegExFoFor' => 'finc\Role\PermissionProvider\Factory::getIpRegExFoFor', //'ipRegExFoFor' => 'finc\Role\PermissionProvider\Factory::getIpRegExFoFor' ,
'finc\Role\PermissionProvider\CatUserType' =>
'finc\Role\PermissionProvider\Factory::getCatUserType',
'finc\Role\PermissionProvider\IpRangeFoFor' =>
'finc\Role\PermissionProvider\Factory::getIpRangeFoFor',
'finc\Role\PermissionProvider\IpRegExFoFor' =>
'finc\Role\PermissionProvider\Factory::getIpRegExFoFor'
], ],
], 'aliases' => [
'CatUserType' => 'finc\Role\PermissionProvider\CatUserType',
'IpRangeFoFor' => 'finc\Role\PermissionProvider\IpRangeFoFor',
'IpRegExFoFor' => 'finc\Role\PermissionProvider\IpRegExFoFor'
]
]
], ],
]; ];
......
...@@ -55,8 +55,9 @@ class Factory implements FactoryInterface ...@@ -55,8 +55,9 @@ class Factory implements FactoryInterface
* *
* @return mixed * @return mixed
*/ */
public function createService(ContainerInterface $container) public function __invoke(
{ ContainerInterface $container, $requestedName, array $options = null
) {
// Load configurations: // Load configurations:
$config = $container->get('VuFind\Config')->get('config'); $config = $container->get('VuFind\Config')->get('config');
$eblHandler = new EblRewrite($config); $eblHandler = new EblRewrite($config);
......
...@@ -27,7 +27,10 @@ ...@@ -27,7 +27,10 @@
*/ */
namespace finc\Role\PermissionProvider; namespace finc\Role\PermissionProvider;
use Interop\Container\ContainerInterface; //use Interop\Container\ContainerInterface;
use Zend\ServiceManager\ServiceManager;
/** /**
* Permission Provider Factory Class * Permission Provider Factory Class
...@@ -40,16 +43,16 @@ use Interop\Container\ContainerInterface; ...@@ -40,16 +43,16 @@ use Interop\Container\ContainerInterface;
* *
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
class Factory class Factory extends \VuFind\Role\PermissionProvider\Factory
{ {
/** /**
* Factory for Username * Factory for Username
* *
* @param ContainerInterface $container Service manager. * @param ServiceManager $container Service manager.
* *
* @return CatUserType * @return CatUserType
*/ */
public static function getCatUserType(ContainerInterface $container) public static function getCatUserType(ServiceManager $container)
{ {
return new CatUserType( return new CatUserType(
$container->get('ZfcRbac\Service\AuthorizationService'), $container->get('ZfcRbac\Service\AuthorizationService'),
...@@ -60,11 +63,11 @@ class Factory ...@@ -60,11 +63,11 @@ class Factory
/** /**
* Factory for IpRangeFoFor * Factory for IpRangeFoFor
* *
* @param ContainerInterface $container Service manager. * @param ServiceManager $container Service manager.
* *
* @return IpRangeFoFor * @return IpRangeFoFor
*/ */
public static function getIpRangeFoFor(ContainerInterface $container) public static function getIpRangeFoFor(ServiceManager $container)
{ {
return new IpRangeFoFor( return new IpRangeFoFor(
$container->get('Request'), $container->get('Request'),
...@@ -75,13 +78,14 @@ class Factory ...@@ -75,13 +78,14 @@ class Factory
/** /**
* Factory for IpRegExFoFor * Factory for IpRegExFoFor
* *
* @param ContainerInterface $container Service manager. * @param ServiceManager $container Service manager.
* *
* @return IpRegExFoFor * @return IpRegExFoFor
*/ */
public static function getIpRegExFoFor(ContainerInterface $container) public static function getIpRegExFoFor(ServiceManager $container)
{ {
return new IpRegExFoFor( return new IpRegExFoFor(
$container->get('Request')); $container->get('Request')
);
} }
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment