kaori 3 лет назад
Родитель
Сommit
0f6319f34d

+ 3 - 2
packages/app/src/server/service/page-grant.ts

@@ -417,8 +417,9 @@ class PageGrantService {
     // -- Public only if top page
     const isOnlyPublicApplicable = isTopPage(page.path);
     if (isOnlyPublicApplicable) {
-      data[Page.GRANT_PUBLIC] = null;
-      return data;
+      return {
+        [Page.GRANT_PUBLIC]: null,
+      };
     }
 
     // -- Any grant is allowed if parent is null

+ 0 - 1
packages/app/test/integration/service/page-grant.test.js

@@ -479,7 +479,6 @@ describe('PageGrantService', () => {
       expect(result).toStrictEqual(
         {
           [PageGrant.GRANT_PUBLIC]: null,
-          [PageGrant.GRANT_RESTRICTED]: null,
         },
       );
     });