Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Christophe Turbout
auth
Commits
55637ab2
Commit
55637ab2
authored
Mar 26, 2019
by
Bertrand Gauthier
Browse files
Module.php : les erreurs de services introuvables lors du chargement des ACL étaiaent tues.
parent
7e3cf398
Changes
1
Hide whitespace changes
Inline
Side-by-side
Module.php
View file @
55637ab2
...
...
@@ -9,7 +9,7 @@ use Zend\EventManager\EventInterface;
use
Zend\ModuleManager\Feature\AutoloaderProviderInterface
;
use
Zend\ModuleManager\Feature\ConfigProviderInterface
;
use
Zend\ModuleManager\Feature\ServiceProviderInterface
;
use
Zend\
Servic
eManager\
Exception\ServiceNotFoundException
;
use
Zend\
Modul
eManager\
ModuleManager
;
use
Zend\ServiceManager\ServiceLocatorInterface
;
use
Zend\View\Helper\Navigation
;
use
ZfcUser\Form\Login
;
...
...
@@ -69,14 +69,12 @@ class Module implements AutoloaderProviderInterface, ConfigProviderInterface, Se
/* @var $services \Zend\ServiceManager\ServiceManager */
$services
=
$application
->
getServiceManager
();
// transmission des ACL aux aides de vue de navigation
try
{
if
(
$services
->
has
(
'BjyAuthorize\Service\Authorize'
))
{
// transmission des ACL aux aides de vue de navigation
$authorizeService
=
$services
->
get
(
'BjyAuthorize\Service\Authorize'
);
/* @var $authorizeService \BjyAuthorize\Service\Authorize */
Navigation
::
setDefaultAcl
(
$authorizeService
->
getAcl
());
Navigation
::
setDefaultRole
(
$authorizeService
->
getIdentity
());
}
catch
(
ServiceNotFoundException
$snfe
)
{
// pas de module BjyAuthorize : pas d'ACL
}
/* @var $options ModuleOptions */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment