Commit b4304dec authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

WIP API : import individu et doctorant à partir de l'inscription admin

parent eec43c62
Loading
Loading
Loading
Loading
+1 −1
Changes for composer.json: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@
        "unicaen/auth-token": "^6.0",
        "unicaen/console": "^6.0",
        "unicaen/db-anonym": "^3.0",
        "unicaen/db-import": "^6.0",
        "unicaen/db-import": "dev-release_6.0.3",
        "unicaen/faq": "^6.0",
        "unicaen/idref": "dev-master",
        "unicaen/ldap": "^6.0",
+1 −0
Changes for config/application.config.php: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ return [
        'Information',
        'Doctorant',
        'StepStar',
//        'InscriptionAdministrative',
        'Application',
        'SygalApi',
        'SygalApiImpl',
+8 −1
Changes for config/autoload/global.php: 8 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -966,7 +966,14 @@ function generateNameForEtab(string $nameTemplate, string $codeEtablissement): s
 */
function generateWhereForEtab(string $codeEtablissement): string
{
    return sprintf("d.source_id = (select id from source where code like '%s::%%')", $codeEtablissement);
    return <<<EOS
d.source_id in (
    select source.id from source 
    join etablissement on source.etablissement_id = etablissement.id
    join structure on etablissement.structure_id = structure.id
    where structure.code = '$codeEtablissement'
)
EOS;
}


+53 −0
Changes for config/autoload/secret.local.php.dist: 53 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -64,6 +64,32 @@ return [
        ],
    ],

    'step_star' => [
        'tef' => [
            'xsl_template_params' => [
                'etablissementStepStar' => 'XXXX',
                'autoriteSudoc_etabSoutenance' => '1234567890',
            ],
        ],
        'api' => [
            'soap_client' => [
                'wsdl' => [
                    'url' => 'https://host.domain.fr/DepotTEF.wsdl',
                ],
                'soap' => [
                    'version' => SOAP_1_1, // cf. extension "php-soap"
                    //'proxy_host' => 'proxy.domain.fr',
                    //'proxy_port' => 3128,
                ],
            ],
            'operations' => [
            ],
            'params' => [
                'idEtablissement' => 'XXXX',
            ],
        ],
    ],

    'cli_config' => [
        'scheme' => 'http',
        'domain' => 'localhost:8000',
@@ -98,6 +124,16 @@ return [
                ]
            ],
        ],
        'hostlocalization' => [
            'activated' => false,
            'proxies' => [
                //xxx.xx.xx.xxx
            ],
            'reverse-proxies' => [
                //xxx.xx.xx.xxx
            ],
            'masque-ip' => '',
        ],
    ],

    'unicaen-auth' => [
@@ -152,4 +188,21 @@ return [
            'f.mail@domain.fr' => "Francis MAIL",
        ],
    ],

    'api-tools-mvc-auth' => [
        'authentication' => [
            'adapters' => [
                'basic' => [
                    'adapter' => 'Laminas\\ApiTools\\MvcAuth\\Authentication\\HttpAdapter',
                    'options' => [
                        'accept_schemes' => [
                            0 => 'basic',
                        ],
                        'realm' => 'api',
                        'htpasswd' => 'config/users.htpasswd',
                    ],
                ],
            ],
        ],
    ],
];
+13 −0
Changes for module/Doctorant/src/Doctorant/Entity/Db/Doctorant.php: 13 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -30,6 +30,8 @@ class Doctorant implements HistoriqueAwareInterface, ResourceInterface, Individu
     */
    protected $sourceCode;

    protected ?string $codeApprenantInSource = null;

    /**
     * @var \Individu\Entity\Db\Individu
     */
@@ -109,6 +111,17 @@ class Doctorant implements HistoriqueAwareInterface, ResourceInterface, Individu
        return $this->sourceCode;
    }

    public function getCodeApprenantInSource(): ?string
    {
        return $this->codeApprenantInSource;
    }

    public function setCodeApprenantInSource(?string $codeApprenantInSource): self
    {
        $this->codeApprenantInSource = $codeApprenantInSource;
        return $this;
    }

    /**
     * Get id
     *
Loading