1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-19 19:21:10 +01:00
phorge-phorge/src/applications/pholio
epriestley c4abf160cc Fix some file policy issues and add a "Query Workspace"
Summary:
Ref T603. Several issues here:

  1. Currently, `FileQuery` does not actually respect object attachment edges when doing policy checks. Everything else works fine, but this was missing an `array_keys()`.
  2. Once that's fixed, we hit a bunch of recursion issues. For example, when loading a User we load the profile picture, and then that loads the User, and that loads the profile picture, etc.
  3. Introduce a "Query Workspace", which holds objects we know we've loaded and know we can see but haven't finished filtering and/or attaching data to. This allows subqueries to look up objects instead of querying for them.
    - We can probably generalize this a bit to make a few other queries more efficient. Pholio currently has a similar (but less general) "mock cache". However, it's keyed by ID instead of PHID so it's not easy to reuse this right now.

This is a bit complex for the problem being solved, but I think it's the cleanest approach and I believe the primitive will be useful in the future.

Test Plan: Looked at pastes, macros, mocks and projects as a logged-in and logged-out user.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D7309
2013-10-14 14:36:06 -07:00
..
application Pholio - add concept of replacing images and primitive history view 2013-07-25 16:59:25 -07:00
config Pholio - support editing images - fixes T3489 2013-07-16 13:31:20 -07:00
constants Pholio - back end for image re-ordering 2013-08-12 13:09:07 -07:00
controller PHUIPropertyListView 2013-10-11 07:53:56 -07:00
editor When editing objects which use files, attach the files to the objects 2013-10-06 17:07:55 -07:00
lipsum lipsum - tighten up some test data generation 2013-10-04 15:29:32 -07:00
mail Pholio - support editing images - fixes T3489 2013-07-16 13:31:20 -07:00
phid Policy - introduce parentQuery and pass around policy configuration from parent to child 2013-09-11 12:19:34 -07:00
query Fix some file policy issues and add a "Query Workspace" 2013-10-14 14:36:06 -07:00
remarkup Pholio - support editing images - fixes T3489 2013-07-16 13:31:20 -07:00
search Restore search indexing to Ponder questions 2013-07-29 12:04:19 -07:00
storage Explain policy exception rules to users 2013-09-27 08:43:41 -07:00
view Allow Pholio mock images to be drag-reordered 2013-08-12 12:08:54 -07:00