Merge branch 'master' into dist/envole/6/master

This commit is contained in:
Arnaud Fornerot 2021-09-14 11:45:01 +02:00
commit 91d2febf2e
1 changed files with 7 additions and 3 deletions

View File

@ -78,7 +78,9 @@ class SecurityController extends Controller
if($masteridentity=="LDAP") {
// Normalement la synchronisation des comptes aurait du générer le compte en base c'est donc pas normal
// Peut-être juste relancer une synchronisation
throw $this->createNotFoundException('Permission denied. Need to synchronize LDAP ? Contact your administrator');
// On tente une synchronisation via methode SSO
$masteridentity="SSO";
// throw $this->createNotFoundException('Permission denied. Need to synchronize LDAP ? Contact your administrator');
}
if($masteridentity=="SSO") {
@ -89,8 +91,10 @@ class SecurityController extends Controller
// On calcule le niveau01 de l'utilisateur
$niveau01=$em->getRepository('CadolesCoreBundle:Niveau01')->calculateNiveau01($attributes);
if(!$niveau01)
throw $this->createNotFoundException('Permission denied. No Organisation Niveau 01 match');
if(!$niveau01) {
$niveau01=$em->getRepository('CadolesCoreBundle:Niveau01')->findAll()[0];
//throw $this->createNotFoundException('Permission denied. No Organisation Niveau 01 match');
}
$user->setUsername($username);
$user->setEmail($email);