Allow users to "Edit a Copy" when trying to edit a panel they don't own
Summary: Fixes T5167. When clicking "Edit" on a dashboard panel you don't own, the UI now allows you to make a copy instead. As a bonus, fixes T5259. Test Plan: See screenshots. Reviewers: chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T5259, T5167 Differential Revision: https://secure.phabricator.com/D9505
This commit is contained in:
@@ -15,6 +15,10 @@ final class PhabricatorDashboardManageController
|
||||
$id = $this->id;
|
||||
$dashboard_uri = $this->getApplicationURI('view/'.$id.'/');
|
||||
|
||||
// TODO: This UI should drop a lot of capabilities if the user can't
|
||||
// edit the dashboard, but we should still let them in for "Install" and
|
||||
// "View History".
|
||||
|
||||
$dashboard = id(new PhabricatorDashboardQuery())
|
||||
->setViewer($viewer)
|
||||
->withIDs(array($this->id))
|
||||
|
||||
Reference in New Issue
Block a user