瀏覽代碼

fix standard rights

Olivier Massot 4 年之前
父節點
當前提交
50c436eaa3
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      ot_admin/Classes/Controller/SiteController.php

+ 4 - 4
ot_admin/Classes/Controller/SiteController.php

@@ -552,7 +552,7 @@ class SiteController extends ActionController
 
 
             // Create the BE Editors group
             // Create the BE Editors group
             // -- NB: this user will then be auto-updated by the ot_connect extension --
             // -- NB: this user will then be auto-updated by the ot_connect extension --
-            $beGroupUid = $this->createBeGroup(
+            $beGroupUid = $this->createOrUpdateBeGroup(
                 $organizationId,
                 $organizationId,
                 $rootUid,
                 $rootUid,
                 $organizationExtraData['admin']
                 $organizationExtraData['admin']
@@ -560,7 +560,7 @@ class SiteController extends ActionController
 
 
             // Create the BE User
             // Create the BE User
             // -- NB: this user will then be auto-updated by the ot_connect extension --
             // -- NB: this user will then be auto-updated by the ot_connect extension --
-            $beUserUid = $this->createBeUser(
+            $beUserUid = $this->createOrUpdateBeUser(
                 $organizationId,
                 $organizationId,
                 $rootUid,
                 $rootUid,
                 $beGroupUid,
                 $beGroupUid,
@@ -1518,9 +1518,9 @@ class SiteController extends ActionController
                 $editorsPerms = self::PERM_SHOW;
                 $editorsPerms = self::PERM_SHOW;
 
 
             } else {
             } else {
-                $adminPerms = self::PERM_SHOW + self::PERM_EDIT_CONTENT + self::PERM_EDIT_PAGE + self::PERM_NEW;
+                $adminPerms = self::PERM_SHOW + self::PERM_EDIT_CONTENT + self::PERM_EDIT_PAGE;
                 if ($isPremium)  {
                 if ($isPremium)  {
-                    $adminPerms += self::PERM_DELETE;
+                    $adminPerms += self::PERM_DELETE + self::PERM_NEW;
                 }
                 }
 
 
                 $editorsPerms = self::PERM_SHOW + self::PERM_EDIT_CONTENT + self::PERM_EDIT_PAGE;
                 $editorsPerms = self::PERM_SHOW + self::PERM_EDIT_CONTENT + self::PERM_EDIT_PAGE;