mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
4c04d4d019
Summary: Ref T4589. Allow users to adjust visibility settings on files explicitly. This makes it easier to understand and manage upcoming changes in T4589. Test Plan: Changed the view policy for a file several times. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T4589 Differential Revision: https://secure.phabricator.com/D10129
24 lines
526 B
PHP
24 lines
526 B
PHP
<?php
|
|
|
|
final class PhabricatorFileShortcutController
|
|
extends PhabricatorFileController {
|
|
|
|
private $id;
|
|
|
|
public function willProcessRequest(array $data) {
|
|
$this->id = $data['id'];
|
|
}
|
|
|
|
public function processRequest() {
|
|
$file = id(new PhabricatorFileQuery())
|
|
->setViewer($this->getRequest()->getUser())
|
|
->withIDs(array($this->id))
|
|
->executeOne();
|
|
if (!$file) {
|
|
return new Aphront404Response();
|
|
}
|
|
|
|
return id(new AphrontRedirectResponse())->setURI($file->getInfoURI());
|
|
}
|
|
|
|
}
|