Last active
December 27, 2015 11:39
-
-
Save bakura10/7319646 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return array( | |
'zfc_rbac' => array( | |
'permissions' => array( | |
// Définition des providers. Exemple (syntaxe à réfléchir voir si on peut pas trouver mieux) | |
'ZfcRbac\Permission\InMemoryPermissionProvider' => array( | |
'member' => array('edit', 'read'), | |
'admin' => array('delete') | |
) | |
), | |
'assertions' => array( | |
'edit' => 'Application\Assertion\EditAssertion' | |
), | |
// Optionnel, pour les assertions avec dépendances | |
'assertion_manager' => array( | |
'factories' => array( | |
'Application\Assertion\EditAssertion' => 'MyFactory' | |
) | |
) | |
) | |
// Deuxième solution, on impose que les providers renvoient quelque chose qui ressemble à ça: | |
'nom_de_la_permission' => array( | |
'roles' => 'foo' | |
'assertion' => 'nom_assertion' | |
); | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment