1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-28 17:52:43 +01:00
phorge-phorge/src/applications
epriestley 40d3bcb891 Fix a complicated object caching issue with the policy filter
Summary:
Fixes T11853. To set this up:

  - Create "Project A".
  - Join "Project A".
  - Create a subproject, "Project A Subproject 1".
    - This causes Project A to become a parent project.
    - This moves you to be a member of "Project A Subproject 1" instead of "Project A" directly.
  - Create another subproject, "Project A Subproject 2".
    - Do not join this subproject.
  - Set the second subproject's policy to "Visible To: Members of Project A".
  - Try to edit the second subproject.

Before this change, this fails:

  - When querying projects, we sometime try to skip loading the viewer's membership in ancestor projects as a small optimization.
  - Via `PhabricatorExtendedPolicyInterface`, we may then return the parent project to the policy filter for extended checks.
  - The PolicyFilter has an optimization: if we're checking an object, and we already have that object, we can just use the object we already have. This is common and useful.
  - However, in this case it causes us to reuse an incomplete object (an object without proper membership information). We fail a policy check which we should pass.

Instead, don't skip loading the viewer's membership in ancestor projects.

Test Plan:
  - Did all that stuff above.
  - Could edit the subproject.
  - Ran `arc unit --everything`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11853

Differential Revision: https://secure.phabricator.com/D16840
2016-11-11 13:42:18 -08:00
..
almanac Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
aphlict Cache user notification and message counts 2016-06-05 08:52:43 -07:00
arcanist/conduit Remove remaining arcanist project code 2015-07-08 19:37:28 +10:00
audit Fix a Herald issue where testing commits against rules with revision-related conditions would fail 2016-09-08 17:16:40 -07:00
auth Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
badges Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
base Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
cache Cache generation of the SSH authentication keyfile for sshd 2016-10-21 07:29:40 -07:00
calendar Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
celerity Support ".ico" in Celerity and simplify rewite rule configuration 2016-10-20 11:28:11 -07:00
chatlog Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
conduit Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
config Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
conpherence Fix Conpherence NUX showing empty Joinable Rooms 2016-10-20 17:34:28 -07:00
console Update DarkConsole for handleRequest 2016-09-19 13:18:27 -04:00
countdown Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
daemon Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
dashboard Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
differential Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
diffusion Fix two error strings in the diffusion.uri.edit Conduit method 2016-11-10 08:55:12 -08:00
diviner Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
doorkeeper Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
draft/storage Clean up some log spam caused by races in VersionedDraft 2016-09-05 13:01:53 -07:00
drydock Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
fact Update Facts for newPage 2016-04-03 15:07:52 -07:00
feed Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
files Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
flag Move FontIcon calls to Icon 2016-01-28 08:48:45 -08:00
fund Consistently refer to 'Projects' as 'Tags' 2016-04-19 16:48:21 +00:00
guides Discourage new users from exploring too much 2016-11-08 13:27:15 -08:00
harbormaster Added a 'name' field to the results for harbormaster.build.search endpoint 2016-09-19 13:15:52 -04:00
help Use "book" instead of "life ring" icon for global help menu 2016-10-28 14:33:18 -07:00
herald Fix a Herald issue where testing commits against rules with revision-related conditions would fail 2016-09-08 17:16:40 -07:00
home Revert "Clean up more Quicksand" 2016-10-01 12:58:30 -07:00
legalpad Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
lipsum Modularize content sources 2016-03-26 11:59:45 -07:00
macro Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
maniphest On tasks, put Task Graph, Mocks and Mentions into a tabgroup 2016-11-06 09:05:14 -08:00
meta Fix policy capitalization 2016-10-20 17:34:59 -07:00
metamta Make Herald test workflow modular and more clear 2016-08-03 16:12:33 -07:00
multimeter Add a cluster.read-only option 2016-04-09 13:40:47 -07:00
notification Add an icon to aphlict connection status 2016-10-02 08:17:21 -07:00
nuance Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
oauthserver Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
owners Allow transactions to specialize their mail headers for diff sections 2016-11-07 12:16:39 -08:00
packages Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
passphrase Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
paste Allow transactions to specialize their mail headers for diff sections 2016-11-07 12:16:39 -08:00
people Separate sever-side typeahead queries into "prefix" and "content" phases 2016-11-10 08:54:59 -08:00
phame Don't lock subscription in PhameBlog 2016-09-23 09:03:41 -04:00
phid Use Doritos™ Brand® perfect circles to indicate Busy/Away/Disabled 2016-11-09 17:13:10 -08:00
phlux Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
pholio Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
phortune Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
phpast Update phpast for new UI 2016-04-05 13:52:59 -07:00
phragment Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
phrequent Redesign Config Application 2016-08-29 15:49:49 -07:00
phriction Fix Phriction document move on to existing document placeholder 2016-10-18 11:58:24 +00:00
phurl Expose conduit API methods for Phurl URLs 2016-09-27 00:21:49 -04:00
policy Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
ponder Make "Core Applications" more reasonable 2016-08-12 07:57:59 -07:00
project Fix a complicated object caching issue with the policy filter 2016-11-11 13:42:18 -08:00
releeph Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
remarkup/conduit phtize all the things 2015-05-22 21:16:39 +10:00
repository Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
search Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
settings Remove plain-text file view of Diffusion files. 2016-11-10 00:40:09 +00:00
slowvote Prepare for event imports in Calendar 2016-10-12 10:45:31 -07:00
spaces Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
subscriptions Allow stacked comment actions to be explicitly ordered 2016-04-06 09:15:27 -07:00
support/application Implement the getName method in PhabricatorApplication subclasses 2014-07-23 23:52:50 +10:00
system Support ".ico" in Celerity and simplify rewite rule configuration 2016-10-20 11:28:11 -07:00
tokens Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
transactions Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
typeahead Separate sever-side typeahead queries into "prefix" and "content" phases 2016-11-10 08:54:59 -08:00
uiexample Add setBackground to PHUIIconView 2016-08-19 13:19:53 -07:00
xhprof Removing deprecated method calls 2016-08-23 03:26:34 -05:00