Review main Merged

63570[BUGFIX] Include Page Read Permissions to PageTreeController

Benni Mack CR +2 V +2 Hard +264 −17 updated 04/04/20, 06:33

Commit message

In order to reduce the amount of data fetched, the PageTree loaded
for editors will only fetch pages that the editor actually sees, reducing
the actual amount of pages to fetch.

If a pagetree has 80.000 pages, but the editor can only see 50, the
tree only loads these 50 pages.

Review

  • Code review CR +2 Done
    • Susi Moog +2
    • Oliver Hader +1
  • Verified V +2 Done
    • Susi Moog +2
    • Oliver Hader +1
    • TYPO3com +1 CI

Issues 1

Files 3

Review log 3645

Show 1520 earlier messages
  1. Benni Mack uploaded patch set 1 03/06/20, 20:04

  2. TYPO3com voted on patch set 1 V +1 03/06/20, 20:19 Completed build in 15m 17s on Fri, 6 Mar, 08:19 PM Test Summary: 72072 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1054

  3. Tymoteusz Motylewski commented on patch set 1 03/10/20, 15:27

    PagePermissionRestriction.php:118

    does $this->user->groupList contain also grup ids inherited from other groups?
  4. Benni Mack commented on patch set 1 03/10/20, 15:30

    PagePermissionRestriction.php:118 Reply Unresolved

    yes
  5. Tymoteusz Motylewski commented on patch set 1 03/10/20, 15:32

    The "orphaned" pages challenge is similar problem we have with the other patch an search & workspaces. If you do a search you also get not a "connected" tree. However here problem is simpler: - get list of mount points - get pages user have access to - iterate down the page tree from mount points down - ignore pages not connected to the mount points
  6. Benni Mack uploaded patch set 2 03/23/20, 15:42

  7. TYPO3com voted on patch set 2 V +1 03/23/20, 15:56 Completed build in 13m 12s on Mon, 23 Mar, 03:56 PM Test Summary: 72225 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1633

  8. Markus Klein commented on patch set 2 03/24/20, 21:25

    PagePermissionRestriction.php:116

    this should use the current alias and not the hardcoded table name
  9. Markus Klein commented on patch set 2 03/24/20, 21:32

    TreeController.php:367 Unresolved

    why not adding this restriction right in \TYPO3\CMS\Backend\Tree\Repository\PageTreeRepository::fetchAllPages()?
  10. Tymoteusz Motylewski commented on patch set 2 V -1 03/28/20, 08:41

  11. Tymoteusz Motylewski commented on patch set 2 V 0 03/29/20, 09:43

    the patch is now green with tests from https://review.typo3.org/c/Packages/TYPO3.CMS/+/63848 the tests were missing aspect initialization
  12. Tymoteusz Motylewski updated the commit message in patch set 3 03/30/20, 06:25

  13. TYPO3com voted on patch set 3 V -1 03/30/20, 06:39 Completed build in 13m 01s on Mon, 30 Mar, 06:39 AM Test Summary: 72537 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1937

  14. Tymoteusz Motylewski uploaded patch set 4 03/30/20, 06:46

  15. Tymoteusz Motylewski commented on patch set 4 03/30/20, 06:47

    the other comment (where to add the constraint) is still to consider

    PagePermissionRestriction.php:116 Reply

    Done
  16. TYPO3com voted on patch set 3 V +1 03/30/20, 06:48 Completed build in 35m 51s on Mon, 30 Mar, 06:48 AM Test Summary: 73050 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1937

  17. Andreas Kienast voted on patch set 4 CR +1 03/30/20, 06:57

  18. TYPO3com voted on patch set 4 V +1 03/30/20, 07:07 Completed build in 17m 21s on Mon, 30 Mar, 07:07 AM Test Summary: 73050 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1940

  19. Markus Klein commented on patch set 4 03/30/20, 07:34

    TreeController.php:371

    Posting my question again, just that it does not get lost: why not adding this restriction right in \TYPO3\CMS\Backend\Tree\Repository\PageTreeRepository::fetchAllPages()?
  20. Benni Mack commented on patch set 4 03/30/20, 07:52

    TreeController.php:371 Reply

    I originally concepted the repository to not know about any context or aspect or anything like that. So there is no access to Context or BE_USER. I guess keeping it flexible makes sense, what do you think? Otherwise I would recommended modifying the constructor of the Repository to hand in the Context and this takes care of everything, but this IMHO out of scope.
  1. Markus Klein commented on patch set 4 CR +1 03/30/20, 07:56

    TreeController.php:371 Reply

    Ack
  2. Benni Mack commented on patch set 4 CR -1 03/30/20, 08:52

    I would still like to have Unit Tests on the PagePermissionRestriction...
  3. Uwe Trotzek commented on patch set 4 V -1 03/30/20, 09:07

    I'll get the following error on the current master (a26680bf) + this patch: Unknown column 'pagesperms_userid' in 'where clause' An exception occurred while executing 'SELECT `uid`, `pid`, `sorting`, `starttime`, `endtime`, `hidden`, `fe_group`, `title`, `nav_title`, `nav_hide`, `php_tree_stop`, `doktype`, `is_siteroot`, `module`, `extendToSubpages`, `content_from_pid`, `t3ver_oid`, `t3ver_wsid`, `t3ver_state`, `t3ver_stage`, `t3ver_tstamp`, `t3ver_move_id`, `perms_userid`, `perms_user`, `perms_groupid`, `perms_group`, `perms_everybody`, `mount_pid`, `shortcut`, `shortcut_mode`, `mount_pid_ol`, `url` FROM `pages` WHERE (`sys_language_uid` = ?) AND ((`pages`.`deleted` = 0) AND ((`pages`.`t3ver_wsid` = 0) AND (`pages`.`t3ver_oid` = 0)) AND ((`pages`.`perms_everybody` & 1 = 1) OR ((`pagesperms_userid` = 45) AND (`pagesperms_user` & 1 = 1)) OR ((`pagesperms_groupid` IN (38, 56, 35, 118, 37, 109, 108, 107, 80, 111, 138, 137, 143, 141, 71, 7, 422, 421, 95, 128, 97, 423)) AND (`pagesperms_group` & 1 = 1))))' I did a db-compare and cleared all caches. Is there something wrong with my db or is there something missing?
  4. Markus Klein commented on patch set 4 CR -1 03/30/20, 09:35

    PagePermissionRestriction.php:104

    . missing

    PagePermissionRestriction.php:106

    here too

    PagePermissionRestriction.php:118

    here too

    PagePermissionRestriction.php:122

    here too
  5. Markus Klein commented on patch set 5 03/30/20, 09:35

    Published edit on patch set 4.
  6. Markus Klein commented on patch set 5 03/30/20, 09:35

    PagePermissionRestriction.php:104 Reply

    Done

    PagePermissionRestriction.php:106 Reply

    Done

    PagePermissionRestriction.php:118 Reply

    Done

    PagePermissionRestriction.php:122 Reply

    Done
  7. Tymoteusz Motylewski uploaded patch set 6 03/30/20, 09:38

  8. Tymoteusz Motylewski commented on patch set 4 03/30/20, 09:39

    Sorry Uwe, I broke it with the latest patched. Now it's fixed. please retest.
  9. TYPO3com voted on patch set 5 V +1 03/30/20, 09:48 Completed build in 12m 22s on Mon, 30 Mar, 09:48 AM Test Summary: 73056 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1948

  10. TYPO3com commented on patch set 6 03/30/20, 09:54 Completed build in 15m 40s on Mon, 30 Mar, 09:54 AM Test Summary: 73056 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1949

  11. Uwe Trotzek commented on patch set 6 V +1 03/30/20, 10:05

    > Patch Set 4: > > Sorry Uwe, I broke it with the latest patched. Now it's fixed. please retest. OK, thanks. Now it works.
  12. Benni Mack commented on patch set 6 CR -1 03/30/20, 10:20

    on it
  13. Benni Mack uploaded patch set 7 03/30/20, 10:42

  14. TYPO3com voted on patch set 7 V +1 03/30/20, 10:59 Completed build in 15m 54s on Mon, 30 Mar, 10:59 AM Test Summary: 73085 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1952

  15. Tymoteusz Motylewski voted on patch set 7 V +1 CR +1 03/30/20, 11:02

  16. Tymoteusz Motylewski commented on patch set 7 03/30/20, 11:03

    tested with live scenario, needs to be also tested with workspaces
  17. Oliver Hader commented on patch set 7 CR +1 04/03/20, 13:13

    PagePermissionRestriction.php:119 Unresolved

    Should we array_map('intval') these values... just to be sure?
  18. Oliver Hader voted on patch set 7 V +1 04/03/20, 13:20

  19. Oliver Hader commented on patch set 7 CR -1 04/03/20, 13:22

    On it...
  20. Oliver Hader uploaded patch set 8 04/03/20, 13:26

  21. Oliver Hader voted on patch set 8 V +1 CR +1 04/03/20, 13:27

  22. TYPO3com voted on patch set 8 V +1 04/03/20, 13:39 Completed build in 12m 30s on Fri, 3 Apr, 01:39 PM Test Summary: 73288 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2124

  23. Andreas Kienast commented on patch set 8 04/03/20, 13:50

    How can I test this patch properly? I don't see a difference in how the code is executed.
  24. Susi Moog voted on patch set 8 V +2 CR +2 04/04/20, 06:33

  25. Susi Moog merged patch set 9 04/04/20, 06:33