Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
open-source
OSE
Commits
b7b7e818
Commit
b7b7e818
authored
May 15, 2018
by
Laurent Lécluse
Browse files
#13723 Bug sur les données personnelles
parent
7436e185
Changes
9
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
b7b7e818
...
...
@@ -12,6 +12,16 @@ les autres sont tout de même mis à jour.
* La personnalisation des liens informatique et libertés et mentions légales refonctionne
* Correction définitive du bug de saisie du service référentiel
* Accès données personnelles : correction d'un bug portant sur certains vacataires affichant une page d'erreur.
## Notes de mise à jour
* PHP 7.0.x est obligatoire. Les versions supérieures de PHP ne sont pas supportées pour le moment.
* Une DeployKey générique est intégrée dans le script d'installation de OSE. Il n'est maintenantp plus nécessaire de
déployer une clé nominative sur un serveur.
#OSE 6.3.1
## Corrections de bugs
...
...
data/Déploiement/Changements.pdf
View file @
b7b7e818
No preview for this file type
data/Déploiement/Procédure d'installation.pdf
View file @
b7b7e818
No preview for this file type
data/Déploiement/Procédure de mise à jour.pdf
View file @
b7b7e818
No preview for this file type
module/Application/autoload_classmap.php
View file @
b7b7e818
...
...
@@ -4,7 +4,6 @@ return [
'Application\Module'
=>
__DIR__
.
'/Module.php'
,
'Application\Validator\DepartementNaissanceValidator'
=>
__DIR__
.
'/src/Application/Validator/DepartementNaissanceValidator.php'
,
'Application\Validator\PaysNaissanceValidator'
=>
__DIR__
.
'/src/Application/Validator/PaysNaissanceValidator.php'
,
'Application\Validator\StatutIntervenantValidator'
=>
__DIR__
.
'/src/Application/Validator/StatutIntervenantValidator.php'
,
'Application\Validator\NumeroINSEEValidator'
=>
__DIR__
.
'/src/Application/Validator/NumeroINSEEValidator.php'
,
'Application\Interfaces\NiveauEtapeAwareInterface'
=>
__DIR__
.
'/src/Application/Interfaces/NiveauEtapeAwareInterface.php'
,
'Application\Interfaces\ServiceAPayerAwareInterface'
=>
__DIR__
.
'/src/Application/Interfaces/ServiceAPayerAwareInterface.php'
,
...
...
module/Application/src/Application/Entity/Db/StatutIntervenant.php
View file @
b7b7e818
...
...
@@ -17,9 +17,6 @@ class StatutIntervenant implements HistoriqueAwareInterface, RoleInterface, Impo
use
HistoriqueAwareTrait
;
use
ImportAwareTrait
;
const
SS_EMPLOI_NON_ETUD
=
'SS_EMPLOI_NON_ETUD'
;
const
NON_AUTORISE
=
'NON_AUTORISE'
;
/**
...
...
module/Application/src/Application/Form/Intervenant/Dossier.php
View file @
b7b7e818
...
...
@@ -87,19 +87,6 @@ class Dossier extends AbstractForm
* la question "Avez-vous exercé une activité..." est retirée puisque la réponse est forcément OUI.
*/
$dossierFieldset
->
remove
(
'premierRecrutement'
);
}
elseif
(
$this
->
getServiceContext
()
->
applicationExists
(
$this
->
getServiceContext
()
->
getAnneePrecedente
()))
{
/**
* Si l'intervenant n'est pas trouvé comme vacataire l'année précédente
* malgré que l'application était en service l'année précédente,
* alors on ne propose pas le statut "Sans emploi et non étudiant".
* En effet, le statut "Sans emploi et non étudiant" n'est pertinent que pour un intervenant
* ayant été vacataire l'année précédente (et ayant perdu son activité principale).
*/
$statutSelect
=
$dossierFieldset
->
get
(
'statut'
);
/* @var $statut \Application\Form\Intervenant\StatutSelect */
$statutSelect
->
getProxy
()
->
setStatutsToRemove
([
$this
->
getServiceStatutIntervenant
()
->
getRepo
()
->
findOneBySourceCode
(
StatutIntervenant
::
SS_EMPLOI_NON_ETUD
),
]);
}
/**
...
...
module/Application/src/Application/Form/Intervenant/DossierFieldset.php
View file @
b7b7e818
...
...
@@ -4,7 +4,6 @@ namespace Application\Form\Intervenant;
use
Application\Entity\Db\Dossier
as
Dossier
;
use
Application\Entity\Db\Pays
as
PaysEntity
;
use
Application\Entity\Db\StatutIntervenant
as
StatutIntervenantEntity
;
use
Application\Form\AbstractFieldset
;
use
Application\Service\Traits\CiviliteServiceAwareTrait
;
use
Application\Service\Traits\ContextServiceAwareTrait
;
...
...
@@ -14,9 +13,7 @@ use Application\Service\Traits\StatutIntervenantServiceAwareTrait;
use
Application\Validator\DepartementNaissanceValidator
;
use
Application\Validator\NumeroINSEEValidator
;
use
Application\Validator\PaysNaissanceValidator
;
use
Application\Validator\StatutIntervenantValidator
;
use
Application\Constants
;
use
LogicException
;
use
DoctrineModule\Form\Element\Proxy
;
use
DoctrineORMModule\Form\Element\EntitySelect
;
use
Zend\Validator\Date
as
DateValidator
;
...
...
@@ -339,8 +336,6 @@ class DossierFieldset extends AbstractFieldset
{
$paysNaissanceId
=
(
int
)
$this
->
get
(
'paysNaissance'
)
->
getValue
();
$numeroInseeProvisoire
=
(
bool
)
$this
->
get
(
'numeroInseeEstProvisoire'
)
->
getValue
();
$statutSelect
=
$this
->
get
(
'statut'
);
/* @var $statutSelect StatutSelect */
// la sélection du département n'est obligatoire que si le pays sélectionné est la France
$departementRequired
=
(
self
::
$franceId
===
$paysNaissanceId
);
...
...
@@ -425,9 +420,6 @@ class DossierFieldset extends AbstractFieldset
],
'statut'
=>
[
'required'
=>
true
,
'validators'
=>
[
$statutSelect
->
getProxy
()
->
getValidator
(),
],
],
];
...
...
@@ -548,59 +540,9 @@ class StatutIntervenantProxy extends Proxy
// reformattage du tableau de données : id => Statut
$pays
=
[];
foreach
(
$this
->
objects
as
$o
)
{
// suppression des statuts à écarter
if
(
in_array
(
$o
,
$this
->
statutsToRemove
))
{
continue
;
}
$pays
[
$o
->
getId
()]
=
$o
;
}
$this
->
objects
=
$pays
;
}
/**
* @var StatutIntervenantEntity[]
*/
private
$statutsToRemove
=
[];
/**
* Statuts à écarter.
*
* @param StatutIntervenantEntity[] $statuts
*
* @return self
*/
public
function
setStatutsToRemove
(
array
$statuts
)
{
$this
->
statutsToRemove
=
[];
foreach
(
$statuts
as
$statut
)
{
if
(
!
$statut
instanceof
StatutIntervenantEntity
)
{
throw
new
LogicException
(
"Les statuts à écarter doivent être spécifiés sous forme d'objets."
);
}
$this
->
statutsToRemove
[
$statut
->
getId
()]
=
$statut
;
}
$this
->
objects
=
[];
// force objects reload
return
$this
;
}
/**
*
* @return StatutIntervenantValidator
*/
public
function
getValidator
()
{
$v
=
new
StatutIntervenantValidator
();
$v
->
setStatutsInterdits
(
$this
->
statutsToRemove
);
return
$v
;
}
}
\ No newline at end of file
module/Application/src/Application/Validator/StatutIntervenantValidator.php
deleted
100644 → 0
View file @
7436e185
<?php
namespace
Application\Validator
;
use
Zend\Validator\AbstractValidator
;
use
Application\Entity\Db\StatutIntervenant
;
class
StatutIntervenantValidator
extends
AbstractValidator
{
const
MSG_INTERDIT
=
'msgInterdit'
;
protected
$messageTemplates
=
array
(
self
::
MSG_INTERDIT
=>
"Ce statut n'est pas accepté."
,
);
private
$statutsInterdits
=
[];
public
function
isValid
(
$value
,
$context
=
null
)
{
$interdits
=
(
array
)
$this
->
getStatutsInterdits
();
$interditsIds
=
array_map
(
function
(
$v
)
{
return
$v
->
getId
();
},
$interdits
);
if
(
$interditsIds
&&
in_array
((
int
)
$value
,
$interditsIds
))
{
$this
->
error
(
self
::
MSG_INTERDIT
);
return
false
;
}
return
true
;
}
/**
* @return StatutIntervenant[]
*/
function
getStatutsInterdits
()
{
return
$this
->
statutsInterdits
;
}
/**
*
* @param StatutIntervenant[] $statutsInterdits
* @return self
*/
function
setStatutsInterdits
(
$statutsInterdits
)
{
$this
->
statutsInterdits
=
(
array
)
$statutsInterdits
;
return
$this
;
}
}
\ No newline at end of file
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