Browse Source

bypass the login procedure for admincmf-test

Olivier Massot 4 months ago
parent
commit
ae74c9d448
1 changed files with 8 additions and 1 deletions
  1. 8 1
      ot_connect/Classes/Service/OtAuthenticationService.php

+ 8 - 1
ot_connect/Classes/Service/OtAuthenticationService.php

@@ -319,7 +319,7 @@ class OtAuthenticationService extends AbstractAuthenticationService
         $now = new DateTime();
         $diff = $now->getTimestamp() - $genDate->getTimestamp();
 
-        return ($diff > self::USER_UPDATE_DELAY);
+        return true || ($diff > self::USER_UPDATE_DELAY);
     }
 
     /**
@@ -409,6 +409,13 @@ class OtAuthenticationService extends AbstractAuthenticationService
                     ['organizationId' => $organizationId]
                 );
 
+                // <-- TODO: supprimer après la fin des tests sur cmf-test
+                if ($organizationId === 616134) {
+                    // Groupe "hard-codé" pour le compte admincmf-test
+                    $groupUid = 4925;
+                }
+                // --->
+
                 if ($groupUid) {
                     $groupsUid[] = $groupUid;
                 } else {