1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Make Dashboards and Panels Flaggable

Summary: Ref T8888, makes these two objects flaggable.

Test Plan: Set Flag, See Flag.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8888

Differential Revision: https://secure.phabricator.com/D13652
This commit is contained in:
Chad Little 2015-07-18 12:19:17 -07:00
parent cee3cde824
commit 82b2caf1ac
5 changed files with 6 additions and 0 deletions

View file

@ -5610,6 +5610,7 @@ phutil_register_library_map(array(
'PhabricatorDashboardDAO',
'PhabricatorApplicationTransactionInterface',
'PhabricatorPolicyInterface',
'PhabricatorFlaggableInterface',
'PhabricatorDestructibleInterface',
),
'PhabricatorDashboardAddPanelController' => 'PhabricatorDashboardController',
@ -5632,6 +5633,7 @@ phutil_register_library_map(array(
'PhabricatorApplicationTransactionInterface',
'PhabricatorPolicyInterface',
'PhabricatorCustomFieldInterface',
'PhabricatorFlaggableInterface',
'PhabricatorDestructibleInterface',
),
'PhabricatorDashboardPanelArchiveController' => 'PhabricatorDashboardController',

View file

@ -93,6 +93,7 @@ final class PhabricatorDashboardManageController
$actions = id(new PhabricatorActionListView())
->setObjectURI($this->getApplicationURI('view/'.$dashboard->getID().'/'))
->setObject($dashboard)
->setUser($viewer);
$can_edit = PhabricatorPolicyFilter::hasCapability(

View file

@ -91,6 +91,7 @@ final class PhabricatorDashboardPanelViewController
$actions = id(new PhabricatorActionListView())
->setObjectURI('/'.$panel->getMonogram())
->setObject($panel)
->setUser($viewer);
$can_edit = PhabricatorPolicyFilter::hasCapability(

View file

@ -7,6 +7,7 @@ final class PhabricatorDashboard extends PhabricatorDashboardDAO
implements
PhabricatorApplicationTransactionInterface,
PhabricatorPolicyInterface,
PhabricatorFlaggableInterface,
PhabricatorDestructibleInterface {
protected $name;

View file

@ -9,6 +9,7 @@ final class PhabricatorDashboardPanel
PhabricatorApplicationTransactionInterface,
PhabricatorPolicyInterface,
PhabricatorCustomFieldInterface,
PhabricatorFlaggableInterface,
PhabricatorDestructibleInterface {
protected $name;