Don't require an actor in PhabricatorFile::attachToObject()
Summary: Ref T6013. A very long time ago, edges were less clearly low-level infrastructure, and some user-aware stuff got built around edge edits. This was kind of a mess and I eventually removed it, during or prior to T5245. The big issue was that control flow was really hard to figure out as things went all the way down to the deepest level of infrastructure and then came back up the stack to events and transactions. The new stuff is more top-down and generally seems a lot easier and cleaner. Consequently, actors are no longer required for edge edits. Remove the parameter. Test Plan: Poked around; ran unit tests. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley, hach-que Maniphest Tasks: T6013 Differential Revision: https://secure.phabricator.com/D10412
This commit is contained in:
@@ -881,7 +881,6 @@ final class DiffusionBrowseFileController extends DiffusionBrowseController {
|
||||
|
||||
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
|
||||
$file->attachToObject(
|
||||
$this->getRequest()->getUser(),
|
||||
$this->getDiffusionRequest()->getRepository()->getPHID());
|
||||
unset($unguarded);
|
||||
|
||||
|
||||
@@ -1037,9 +1037,7 @@ final class DiffusionCommitController extends DiffusionController {
|
||||
));
|
||||
|
||||
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
|
||||
$file->attachToObject(
|
||||
$this->getRequest()->getUser(),
|
||||
$drequest->getRepository()->getPHID());
|
||||
$file->attachToObject($drequest->getRepository()->getPHID());
|
||||
unset($unguarded);
|
||||
|
||||
return $file->getRedirectResponse();
|
||||
|
||||
Reference in New Issue
Block a user