Make most Differential reads policy-aware
Summary: Ref T603. Makes the majority of reads policy aware (and pretty much all the important ones). Test Plan: - Created a comment with `differential.createcomment`. - Created a new revision with `arc diff` in order to exercise `differential.creatediff`. - Created an inline comment with `differential.createinline`. - Added a comment to a revision. - Edited an inline comment. - Edited a revision. - Wrote "Depends on ..." in a summary, saved, verified link was created. - Browsed a file in Diffusion. - Got past the code I changed in the Releeph request thing. - Edited a Releeph request. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T603 Differential Revision: https://secure.phabricator.com/D7136
This commit is contained in:
@@ -8,8 +8,13 @@ final class DifferentialCommentSaveController extends DifferentialController {
|
||||
return new Aphront400Response();
|
||||
}
|
||||
|
||||
$viewer = $request->getUser();
|
||||
|
||||
$revision_id = $request->getInt('revision_id');
|
||||
$revision = id(new DifferentialRevision())->load($revision_id);
|
||||
$revision = id(new DifferentialRevisionQuery())
|
||||
->setViewer($viewer)
|
||||
->withIDs(array($revision_id))
|
||||
->executeOne();
|
||||
if (!$revision) {
|
||||
return new Aphront400Response();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user