1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-22 12:41:19 +01:00
phorge-phorge/src/applications/dashboard
epriestley f64edb993f Allow users who can edit a dashboard to remove invalid / restricted panels
Summary:
Ref T12207. Currently, to remove a panel from a dashboard, it must be a valid panel which you can see.

Instead, only require that the panel PHID actually be listed somewhere in the dashboard's internal list of panels.

This interacts with the "multiple instances of a panel" issue described in some more depth in T12207. In particular:

  - Currently, you can sort of add multiple copies of a panel to a dashboard, sometimes? Maybe?
  - This leads to great tragedy.

This doesn't fix up the workflow with respect to multiple copies of a panel. We still remove by panel PHID (not by column/position or internal ID) so if a dashboard has multiple copies of the same panel for some reason, I think this workflow removes one of them arbitrarily (at best) or perhaps does something worse. I'm just treating this behavior as undefined for the moment.

Test Plan:
- Removed an invalid/hidden panel from a dashboard as a user with permission to edit that dashboard.
- Tried to remove a made-up panel with a totally bogus PHID, got 404'd.
- Viewed a dashboard with a restricted panel.
- Put a hidden panel inside a tab panel, viewed it as a user who could not see it and a user who could.

Reviewers: chad

Reviewed By: chad

Subscribers: swisspol

Maniphest Tasks: T12207

Differential Revision: https://secure.phabricator.com/D17314
2017-02-04 16:33:47 -08:00
..
application Redesign Home/Profile/Projects side navigation 2017-01-31 08:59:01 -08:00
conduit Implement a "pro" EditEngine for dashboard panels 2016-07-03 15:07:36 -07:00
controller Allow users who can edit a dashboard to remove invalid / restricted panels 2017-02-04 16:33:47 -08:00
customfield Implement a "pro" EditEngine for dashboard panels 2016-07-03 15:07:36 -07:00
edge Modernize Dashboard edges 2015-01-02 10:11:59 +11:00
editor Add Ngram support to Dashboards / Panels 2016-12-16 12:09:06 -08:00
engine Allow users who can edit a dashboard to remove invalid / restricted panels 2017-02-04 16:33:47 -08:00
icon Allow Dashboards to set an icon 2016-12-13 11:30:22 -08:00
layoutconfig Extend from Phobject 2015-06-15 18:02:27 +10:00
paneltype Allow users who can edit a dashboard to remove invalid / restricted panels 2017-02-04 16:33:47 -08:00
phid Mark PhabricatorPHIDType::getPHIDTypeApplicationClass() as abstract 2015-11-03 06:47:12 +11:00
query When a viewer can't see some of a dashboard's panels, only hide those panels 2017-02-03 10:14:14 -08:00
remarkup Allow users who can edit a dashboard to remove invalid / restricted panels 2017-02-04 16:33:47 -08:00
storage Add a Dashboard MenuItem 2016-12-16 13:33:03 -08:00
typeahead Add Dashboard typeaheads 2016-12-16 08:41:28 -08:00