Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make view strategy configurable

  • Loading branch information...
commit 7a6bc53d1ad53c2ef8ef11df0adda9cd95111df3 1 parent acf470b
@bjyoungblood authored
Showing with 5 additions and 3 deletions.
  1. +2 −1  Module.php
  2. +2 −2 composer.json
  3. +1 −0  config/module.config.php
View
3  Module.php
@@ -17,9 +17,10 @@ class Module implements
public function onBootstrap(EventInterface $e)
{
$app = $e->getTarget();
+ $config = $app->getConfig();
$sm = $app->getServiceManager();
$service = $sm->get('BjyAuthorize\Service\Authorize');
- $strategy = $sm->get('BjyAuthorize\View\UnauthorizedStrategy');
+ $strategy = $sm->get($config['bjyauthorize']['unauthorized_strategy']);
foreach ($service->getGuards() as $guard) {
$app->getEventManager()->attach('route', array($guard, 'onRoute'), -1000);
View
4 composer.json
@@ -1,6 +1,6 @@
{
"name": "bjyoungblood/bjy-authorize",
- "description": "Clean Acl implementation to be as integrable and extendable as ZfcUser",
+ "description": "Easy-use loader and manager for Zend\Acl with built-in route and dispatch protection",
"type": "library",
"keywords": [
"zf2",
@@ -17,7 +17,7 @@
],
"require": {
"php": ">=5.3.3",
- "zendframework/zendframework": "dev-master",
+ "zendframework/zendframework": "2.0.*",
"zf-commons/zfc-base": "dev-master",
"zf-commons/zfc-user": "dev-master"
},
View
1  config/module.config.php
@@ -4,6 +4,7 @@
'bjyauthorize' => array(
'default_role' => 'guest',
'identity_provider' => 'BjyAuthorize\Provider\Identity\ZfcUserZendDb',
+ 'unauthorized_strategy' => 'BjyAuthorize\View\UnauthorizedStrategy',
'role_providers' => array(
),
'resource_providers' => array(
Please sign in to comment.
Something went wrong with that request. Please try again.