1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-24 15:52:41 +01:00
phorge-phorge/src/applications
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
..
arcanist/conduit Move Conduit methods inside applications 2012-12-21 12:21:59 -08:00
audit Always pass handles to tokenizers, not <phid -> name> maps 2013-10-07 12:51:24 -07:00
auth Add Persona auth provider 2013-10-14 14:34:57 -07:00
base Improve messaging of special policy rules in applications 2013-10-09 13:52:04 -07:00
cache Provide 'bin/cache', for managing caches 2013-05-20 10:16:35 -07:00
calendar Move PHUIFormBoxView to PHUIObjectBoxView 2013-09-25 11:23:29 -07:00
chatlog Improve pagination in ChatLog application 2013-10-10 04:49:04 -07:00
conduit Make PhabricatorPolicyInterface require a getPHID() method 2013-10-14 14:35:47 -07:00
config Make PhabricatorPolicyInterface require a getPHID() method 2013-10-14 14:35:47 -07:00
conpherence Make PhabricatorPolicyInterface require a getPHID() method 2013-10-14 14:35:47 -07:00
countdown Make PhabricatorPolicyInterface require a getPHID() method 2013-10-14 14:35:47 -07:00
daemon Make PhabricatorPolicyInterface require a getPHID() method 2013-10-14 14:35:47 -07:00
differential Make PhabricatorPolicyInterface require a getPHID() method 2013-10-14 14:35:47 -07:00
diffusion Add border, transparent indicators to images in file property view 2013-10-14 11:40:19 -07:00
directory/controller Hide Audit information on Home when the application is uninstalled 2013-10-09 15:25:03 -07:00
diviner Make PhabricatorPolicyInterface require a getPHID() method 2013-10-14 14:35:47 -07:00
doorkeeper Remove loadMemberPHIDs from PhabricatorProject 2013-10-06 17:07:08 -07:00
draft/storage Add draft support to ApplicationTransactions 2012-12-21 05:57:14 -08:00
drydock PHUIPropertyListView 2013-10-11 07:53:56 -07:00
fact Convert AphrontTableView to safe HTML 2013-02-09 15:11:38 -08:00
feed Make PhabricatorPolicyInterface require a getPHID() method 2013-10-14 14:35:47 -07:00
files Fix some file policy issues and add a "Query Workspace" 2013-10-14 14:36:06 -07:00
flag Flags - add ability to group by color 2013-10-01 15:06:35 -07:00
harbormaster Make most repository reads policy-aware 2013-09-25 16:54:48 -07:00
help/controller Make Differential views capability-sensitive 2013-09-26 18:45:04 -07:00
herald Make PhabricatorPolicyInterface require a getPHID() method 2013-10-14 14:35:47 -07:00
legalpad Make PhabricatorPolicyInterface require a getPHID() method 2013-10-14 14:35:47 -07:00
lipsum Kill PhabricatorObjectDataHandle 2013-09-11 12:27:28 -07:00
macro Fix some file policy issues and add a "Query Workspace" 2013-10-14 14:36:06 -07:00
mailinglists Make PhabricatorPolicyInterface require a getPHID() method 2013-10-14 14:35:47 -07:00
maniphest Make PhabricatorPolicyInterface require a getPHID() method 2013-10-14 14:35:47 -07:00
meta PHUIPropertyListView 2013-10-11 07:53:56 -07:00
metamta Maniphest - add support for !assign command 2013-10-14 12:29:41 -07:00
notification Allow projects to review revisions 2013-10-05 14:10:46 -07:00
oauthserver Initialize used variable 2013-07-09 21:55:27 -07:00
owners Make PhabricatorPolicyInterface require a getPHID() method 2013-10-14 14:35:47 -07:00
paste Fix some file policy issues and add a "Query Workspace" 2013-10-14 14:36:06 -07:00
people Fix some file policy issues and add a "Query Workspace" 2013-10-14 14:36:06 -07:00
phame Make PhabricatorPolicyInterface require a getPHID() method 2013-10-14 14:35:47 -07:00
phid Fix some file policy issues and add a "Query Workspace" 2013-10-14 14:36:06 -07:00
phlux PHUIPropertyListView 2013-10-11 07:53:56 -07:00
pholio Fix some file policy issues and add a "Query Workspace" 2013-10-14 14:36:06 -07:00
phortune PHUIPropertyListView 2013-10-11 07:53:56 -07:00
phpast Move PHUIFormBoxView to PHUIObjectBoxView 2013-09-25 11:23:29 -07:00
phrequent Add "Stop Tracking" link to entries in the Phrequent search view. 2013-10-01 13:17:28 -07:00
phriction Make PhabricatorPolicyInterface require a getPHID() method 2013-10-14 14:35:47 -07:00
policy Make PhabricatorPolicyInterface require a getPHID() method 2013-10-14 14:35:47 -07:00
ponder PHUIPropertyListView 2013-10-11 07:53:56 -07:00
project Fix some file policy issues and add a "Query Workspace" 2013-10-14 14:36:06 -07:00
releeph Make PhabricatorPolicyInterface require a getPHID() method 2013-10-14 14:35:47 -07:00
remarkup/conduit Convert Remarkup to safe HTML 2013-02-13 12:34:49 -08:00
repository Make PhabricatorPolicyInterface require a getPHID() method 2013-10-14 14:35:47 -07:00
search Always pass handles to tokenizers, not <phid -> name> maps 2013-10-07 12:51:24 -07:00
settings Move "unlisted" apps to Query, use Query for app preferences 2013-10-04 06:46:47 -07:00
slowvote PHUIPropertyListView 2013-10-11 07:53:56 -07:00
subscriptions Kill PhabricatorObjectDataHandle 2013-09-11 12:27:28 -07:00
system Add a user-accessible hook for dumping debug code into an install 2013-03-04 13:45:51 -08:00
tokens Explain policy exception rules to users 2013-09-27 08:43:41 -07:00
transactions When editing objects which use files, attach the files to the objects 2013-10-06 17:07:55 -07:00
typeahead Remove ProjectProfile->loadProfileImageURI() 2013-10-06 17:07:43 -07:00
uiexample PHUIPropertyListView 2013-10-11 07:53:56 -07:00
xhprof Make most file reads policy-aware 2013-09-30 09:38:13 -07:00