Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
open-source
OSE
Commits
a367c81a
Commit
a367c81a
authored
Nov 12, 2019
by
Laurent Lécluse
Browse files
Correction bug #25557
parent
270f7932
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
a367c81a
...
...
@@ -9,6 +9,7 @@ author: Laurent Lécluse - DSI - Unicaen
*
Un bug modifiant les paramètres globaux qui avaient été configurés a été résolu
*
La duplication de statuts refonctionne
*
Lors de la création d'un nouveau statut, l'octroi de privilèges ne plante plus
# OSE 9.0.1-zf2 et 9.0.1-zf3
...
...
module/Application/src/Application/Controller/StatutIntervenantController.php
View file @
a367c81a
...
...
@@ -2,9 +2,11 @@
namespace
Application\Controller
;
use
Application\Cache\Traits\CacheContainerTrait
;
use
Application\Entity\Db\StatutIntervenant
;
use
Application\Provider\Privilege\Privileges
;
use
Application\Form\StatutIntervenant\Traits\StatutIntervenantSaisieFormAwareTrait
;
use
Application\Provider\Role\RoleProvider
;
use
Application\Service\Traits\StatutIntervenantServiceAwareTrait
;
use
UnicaenApp\View\Model\MessengerViewModel
;
use
Application\Service\Traits\TypeIntervenantServiceAwareTrait
;
...
...
@@ -15,6 +17,7 @@ class StatutIntervenantController extends AbstractController
use
StatutIntervenantServiceAwareTrait
;
use
StatutIntervenantSaisieFormAwareTrait
;
use
TypeIntervenantServiceAwareTrait
;
use
CacheContainerTrait
;
...
...
@@ -54,6 +57,7 @@ class StatutIntervenantController extends AbstractController
$form
->
bindRequestSave
(
$statutIntervenant
,
$this
->
getRequest
(),
function
(
StatutIntervenant
$si
)
{
try
{
$this
->
getServiceStatutIntervenant
()
->
save
(
$si
);
unset
(
$this
->
getCacheContainer
(
RoleProvider
::
class
)
->
statutsInfo
);
$this
->
flashMessenger
()
->
addSuccessMessage
(
'Enregistrement effectué'
);
}
catch
(
\
Exception
$e
)
{
$this
->
flashMessenger
()
->
addErrorMessage
(
$this
->
translate
(
$e
));
...
...
@@ -82,6 +86,7 @@ class StatutIntervenantController extends AbstractController
$form
->
bindRequestSave
(
$newStatutIntervenant
,
$this
->
getRequest
(),
function
(
StatutIntervenant
$si
)
{
try
{
$this
->
getServiceStatutIntervenant
()
->
save
(
$si
);
unset
(
$this
->
getCacheContainer
(
RoleProvider
::
class
)
->
statutsInfo
);
$this
->
flashMessenger
()
->
addSuccessMessage
(
'Duplication effectuée'
);
}
catch
(
\
Exception
$e
)
{
$this
->
flashMessenger
()
->
addErrorMessage
(
$this
->
translate
(
$e
));
...
...
@@ -111,6 +116,7 @@ class StatutIntervenantController extends AbstractController
}
else
{
try
{
$this
->
getServiceStatutIntervenant
()
->
delete
(
$statutIntervenant
);
unset
(
$this
->
getCacheContainer
(
RoleProvider
::
class
)
->
statutsInfo
);
$this
->
flashMessenger
()
->
addSuccessMessage
(
"Statut d'Intervenant supprimé avec succès."
);
}
catch
(
\
Exception
$e
)
{
$this
->
flashMessenger
()
->
addErrorMessage
(
$this
->
translate
(
$e
));
...
...
module/Application/src/Application/Provider/Role/RoleProvider.php
View file @
a367c81a
...
...
@@ -2,6 +2,7 @@
namespace
Application\Provider\Role
;
use
Application\Cache\Traits\CacheContainerTrait
;
use
Application\Entity\Db\Affectation
;
use
Application\Entity\Db\Structure
;
use
Application\Service\Traits\ContextServiceAwareTrait
;
...
...
@@ -29,6 +30,7 @@ class RoleProvider implements ProviderInterface, EntityManagerAwareInterface
use
IntervenantServiceAwareTrait
;
use
PrivilegeProviderAwareTrait
;
use
ContextServiceAwareTrait
;
use
CacheContainerTrait
;
/**
* @var array
...
...
@@ -192,8 +194,8 @@ class RoleProvider implements ProviderInterface, EntityManagerAwareInterface
public
function
getStatutsInfo
()
{
$
session
=
$this
->
get
Session
Container
();
if
(
!
isset
(
$
session
->
statutsInfo
))
{
$
cc
=
$this
->
get
Cache
Container
(
self
::
class
);
if
(
!
isset
(
$
cc
->
statutsInfo
))
{
$si
=
[];
$statuts
=
$this
->
getServiceStatutIntervenant
()
->
getList
();
foreach
(
$statuts
as
$statut
)
{
...
...
@@ -203,10 +205,10 @@ class RoleProvider implements ProviderInterface, EntityManagerAwareInterface
'role-name'
=>
$statut
->
getTypeIntervenant
()
->
getLibelle
(),
];
}
$
session
->
statutsInfo
=
$si
;
$
cc
->
statutsInfo
=
$si
;
}
return
$
session
->
statutsInfo
;
return
$
cc
->
statutsInfo
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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