Commit bba32b39 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Simplification du privilege sur l'export rh.

parent fbd365b7
......@@ -419,13 +419,6 @@ return [
'grade-edition' => 'Édition grades',
],
],
'export-rh' => [
'libelle' => 'Export RH',
'privileges' => [
'prise-en-charge' => 'Prise en charge d\'un intervenant',
'renouvellement' => 'Renouvellement d\'un intervenant',
'synchronisation' => 'Synchronisation d\'un intervenant',
],
],
];
\ No newline at end of file
......@@ -226,8 +226,5 @@ class Privileges extends \UnicaenAuth\Provider\Privilege\Privileges
const UNICAEN_TBL_UPDATE_ACTUPROC = 'unicaen-tbl-update-actuproc';
const WORKFLOW_DEPENDANCES_EDITION = 'workflow-dependances-edition';
const WORKFLOW_DEPENDANCES_VISUALISATION = 'workflow-dependances-visualisation';
const EXPORT_RH_PEC = 'export-rh-prise-en-charge';
const EXPORT_RH_REN = 'export-rh-renouvellement';
const EXPORT_RH_SYNC = 'export-rh-synchronisation';
}
\ No newline at end of file
......@@ -35,7 +35,7 @@ if ($this->isAllowed(Privileges::getResourceId(Privileges::INTERVENANT_EDITION))
];
}
if ($this->isAllowed($intervenant, Privileges::EXPORT_RH_SYNC)) {
if ($this->isAllowed($intervenant, \ExportRh\Assertion\ExportRhAssertion::PRIV_CAN_INTERVENANT_EXPORT_RH)) {
$tabs[] = [
'id' => 'export-rh',
'label' => '<span class="glyphicon glyphicon-export"></span> Export RH',
......
......@@ -145,14 +145,14 @@ return [
[
'controller' => Controller\AdministrationController::class,
'action' => ['index', 'chercher-intervenant-rh'],
'privileges' => [Privileges::EXPORT_RH_SYNC],
'privileges' => [Privileges::INTERVENANT_EXPORTER],
//'assertion' => Assertion\AgrementAssertion::class,
],
[
'controller' => Controller\ExportRhController::class,
'action' => ['exporter', 'prise-en-charge', 'renouvellement', 'synchroniser'],
'privileges' => [Privileges::EXPORT_RH_SYNC],
'privileges' => [Privileges::INTERVENANT_EXPORTER],
'assertion' => ExportRhAssertion::class,
],
......@@ -163,7 +163,7 @@ return [
'allow' => [
[
'privileges' => [
Privileges::EXPORT_RH_SYNC,
Privileges::INTERVENANT_EXPORTER,
ExportRhAssertion::PRIV_CAN_INTERVENANT_EXPORT_RH,
],
'resources' => 'Intervenant',
......
......@@ -68,7 +68,7 @@ class ExportRhAssertion extends AbstractAssertion
protected function assertIntervenantExportRh(Intervenant $intervenant)
{
if (!$this->getRole()->hasPrivilege(Privileges::EXPORT_RH_SYNC)) {
if (!$this->getRole()->hasPrivilege(Privileges::INTERVENANT_EXPORTER)) {
return false;
}
......
......@@ -280,7 +280,7 @@ class SihamConnecteur implements ConnecteurRhInterface
'noVoie' => ' ',
'natureVoie' => '',
'nomVoie' => ' ',
'commune' => $dossierIntervenant->getAdresseCommune(),
'ville' => $dossierIntervenant->getAdresseCommune(),
'codePostal' => $dossierIntervenant->getAdresseCodePostal(),
'codePays' => $dossierIntervenant->getAdressePays()->getCode(),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment