Page MenuHomePhabricator

Allow users who can edit a dashboard to remove invalid / restricted panels
ClosedPublic

Authored by epriestley on Feb 5 2017, 12:16 AM.
Tags
None
Referenced Files
F13235108: D17314.diff
Tue, May 21, 4:15 AM
F13229340: D17314.id.diff
Mon, May 20, 3:52 PM
F13212582: D17314.diff
Fri, May 17, 6:53 AM
F13196701: D17314.diff
Sun, May 12, 11:29 PM
F13191943: D17314.id41640.diff
Sun, May 12, 3:01 AM
F13191541: D17314.id41640.diff
Sat, May 11, 10:05 PM
F13182141: D17314.id41641.diff
Thu, May 9, 7:57 PM
F13178671: D17314.diff
Wed, May 8, 8:34 PM
Subscribers

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable