Browse Source

get be_user editor status from api

Olivier Massot 11 months ago
parent
commit
418556bee3
1 changed files with 1 additions and 5 deletions
  1. 1 5
      ot_connect/Classes/Service/OtAuthenticationService.php

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

@@ -329,10 +329,6 @@ class OtAuthenticationService extends AbstractAuthenticationService
         // Get user's data from the API
         // Get user's data from the API
         $userApiData = $this->getUserData();
         $userApiData = $this->getUserData();
 
 
-        // <--- TODO: remove this, for tests only
-        $userApiData['accesses'][0]['typo3_editor'] = true;
-        // --->
-
         if (empty($userApiData)) {
         if (empty($userApiData)) {
             // An error happened, and even if the user was logged, we can not continue
             // An error happened, and even if the user was logged, we can not continue
             // (user's data and rights could have changed)
             // (user's data and rights could have changed)
@@ -372,7 +368,7 @@ class OtAuthenticationService extends AbstractAuthenticationService
         // Loop over the accesses of the user to list the matching organization groups
         // Loop over the accesses of the user to list the matching organization groups
         if ($userApiData['accesses']) {
         if ($userApiData['accesses']) {
             foreach ($userApiData['accesses'] as $accessData) {
             foreach ($userApiData['accesses'] as $accessData) {
-                if ($isBackend && !$accessData['typo3_editor']) {
+                if ($isBackend && !$accessData['isEditor']) {
                     continue;
                     continue;
                 }
                 }