1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-21 09:48:47 +02:00
phorge-phorge/src/applications/diviner
epriestley 2a5c987c71 Lock policy queries to their applications
Summary:
While we mostly have reasonable effective object accessibility when you lock a user out of an application, it's primarily enforced at the controller level. Users can still, e.g., load the handles of objects they can't actually see. Instead, lock the queries to the applications so that you can, e.g., never load a revision if you don't have access to Differential.

This has several parts:

  - For PolicyAware queries, provide an application class name method.
  - If the query specifies a class name and the user doesn't have permission to use it, fail the entire query unconditionally.
  - For handles, simplify query construction and count all the PHIDs as "restricted" so we get a UI full of "restricted" instead of "unknown" handles.

Test Plan:
  - Added a unit test to verify I got all the class names right.
  - Browsed around, logged in/out as a normal user with public policies on and off.
  - Browsed around, logged in/out as a restricted user with public policies on and off. With restrictions, saw all traces of restricted apps removed or restricted.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7367
2013-10-21 17:20:27 -07:00
..
application Diviner CSS, layout updates 2013-09-10 07:26:00 -07:00
atom Clean up some more Diviner stuff 2013-09-08 09:16:55 -07:00
atomizer Allow Diviner groups to be configured in .book files 2013-09-02 11:33:02 -07:00
cache Add a ref cache and index construction to Diviner 2013-02-17 15:40:11 -08:00
controller PHUIPropertyListView 2013-10-11 07:53:56 -07:00
markup Generate PHP function documentation in Diviner 2013-08-27 03:14:00 -07:00
phid Lock policy queries to their applications 2013-10-21 17:20:27 -07:00
publisher Link and summarize methods in the "Tasks" view of a Diviner class 2013-09-08 09:12:33 -07:00
query Lock policy queries to their applications 2013-10-21 17:20:27 -07:00
renderer Link and summarize methods in the "Tasks" view of a Diviner class 2013-09-08 09:12:33 -07:00
storage Make PhabricatorPolicyInterface require a getPHID() method 2013-10-14 14:35:47 -07:00
view Policy, Status in PHUIHeaderView 2013-09-17 09:12:37 -07:00
workflow Clean up some more Diviner stuff 2013-09-08 09:16:55 -07:00