Page MenuHomePhabricator

Phriction - stop leaking document titles you can't see
ClosedPublic

Authored by btrahan on Nov 9 2014, 2:41 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 12, 7:41 AM
Unknown Object (File)
Mon, Nov 11, 8:19 PM
Unknown Object (File)
Mon, Nov 11, 8:19 PM
Unknown Object (File)
Oct 24 2024, 5:42 AM
Unknown Object (File)
Oct 24 2024, 1:29 AM
Unknown Object (File)
Oct 18 2024, 1:18 PM
Unknown Object (File)
Oct 17 2024, 10:11 PM
Unknown Object (File)
Sep 17 2024, 7:32 AM
Subscribers
Tokens
"Doubloon" token, awarded by chad.

Details

Summary

Fixes T6495. convert ad hoc query to a PhrictionDocumentQuery, thus enforcing view permissions

Test Plan

noted my test user a had a great wiki while test user b couldn't see most things.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

btrahan retitled this revision from to Phriction - stop leaking document titles you can't see.
btrahan updated this object.
btrahan edited the test plan for this revision. (Show Details)
btrahan added a reviewer: epriestley.
epriestley edited edge metadata.

This looks good, but we need to retain the ORDER BY to deal with the cases where we exceed the limit by having too many children, grandchildren, or both.

src/applications/phriction/controller/PhrictionDocumentController.php
376

Preserving the depth order is important: it guarantees that we got all the children if we get back any grandchildren. That is, if there are 100 children and 500 grandchildren, we might just get back 250 grandchildren if we don't specify the depth order. This leaves us out to dry on actually rendering stuff, since we don't know about any of the children.

Preserving the title order is important too, since if there are 500 children we'd like to get back the first 250, not just any 250.

This revision now requires changes to proceed.Nov 9 2014, 1:15 PM
btrahan edited edge metadata.

Preserve order stuff by introducing a new order type of ORDER_HIERARCHY. This also adds a conditional JOIN based on if we are using ORDER_HIERARCHY or not.

epriestley edited edge metadata.
This revision is now accepted and ready to land.Nov 11 2014, 9:14 PM
This revision was automatically updated to reflect the committed changes.