Introduce PhabricatorSavedQueryQuery
Summary: Same as D6051, but for SavedQueries instead of NamedQueries. These are POLICY_PUBLIC because you need to know the hash to access them, and because we want to let users copy/paste query URLs. Ref T2625. Test Plan: Saved a query, reused a saved query. Reviewers: btrahan, blc Reviewed By: btrahan CC: aran Maniphest Tasks: T2625 Differential Revision: https://secure.phabricator.com/D6054
This commit is contained in:
@@ -34,9 +34,10 @@ final class PhabricatorPasteListController extends PhabricatorPasteController {
|
||||
->setPasteSearchUser($request->getUser());
|
||||
|
||||
if ($this->queryKey !== null) {
|
||||
$saved_query = id(new PhabricatorSavedQuery())->loadOneWhere(
|
||||
'queryKey = %s',
|
||||
$this->queryKey);
|
||||
$saved_query = id(new PhabricatorSavedQueryQuery())
|
||||
->setViewer($user)
|
||||
->withQueryKeys(array($this->queryKey))
|
||||
->executeOne();
|
||||
|
||||
if (!$saved_query) {
|
||||
return new Aphront404Response();
|
||||
|
||||
Reference in New Issue
Block a user