Page MenuHomePhabricator

Dashboards should offer "Edit a Copy" when trying to edit a panel you can't edit
Closed, ResolvedPublic

Description

When a user is editing a dashboard they have permission to edit and tries to edit a panel they don't have permission to edit, we currently block them pretty hard.

Instead, we should pop a dialog telling them that they can't edit this panel, but they can make a copy of it which they will be able to edit. If they choose to "Edit a Copy", the copy should replace the original panel on the dashboard.


Original Description

In UltraDash++, I can change the layout, but not edit any of the panels included. I'd want policies to also be available on these objects too.

Event Timeline

chad raised the priority of this task from to Needs Triage.
chad updated the task description. (Show Details)
chad added a project: Dashboards.
chad moved this task to Backlog on the Dashboards board.
chad added subscribers: chad, epriestley, btrahan, lpriestley.

They should be, but policies are per-panel.

I think the solution we talked about before was having "Edit" pop a dialog like this if you can't edit the panel:

You can't edit this panel, do you want to make a copy instead?

Your copy will replace the panel on this dashboard. Other uses
of the panel will not be affected.

  [ Cancel ] [ Edit a Copy ]

I'm just going to realign this task to that, since I don't think we have a task for that yet.

Oh, so I can ask you to just open up some of the panels for UltraDash now?

yep

IF YOU SEEM TRUSTWORTHY

Which ones do you want? I can do them all but there are like ELEVEN OF THEM which is SO MANY PANELS.

I'll just do them all.

I still don't know the JSON of how you built the welcome panels. I'm trying to build them in my dev box.

(For general context / future viewers / @lpriestley / etc.:)

  • Panels themselves do have policies now, after T4982 (@chad just doesn't have permissions on any of the UltraDash++ panels right now).
  • I think it's correct that panels can be shared between boards and have independent policies.
    • Particularly, this allows the construction of common/shared panels which aren't a total free-for-all.
    • For example, you might imagine an "announcements" panel that all the default dashboards share, and which many users have added to their custom dashboards, containing important and very serious company announcements.
    • A random user shouldn't be able to edit it (and adding it to one of their dashboards shouldn't magically let them edit it), since doing so could be disruptive.
  • However, if it's fine if they want to make a copy of it, and the thinking is that the "Edit a copy" workflow will reasonably resolve all the concerns here.

Okay, you should have edit on all the UltraDash panels now.

epriestley renamed this task from Dashboard panels should have policies, allow me to edit to Dashboards should offer "Edit a Copy" when trying to edit a panel you can't edit.May 23 2014, 3:44 PM
epriestley assigned this task to btrahan.
epriestley triaged this task as Normal priority.
epriestley updated the task description. (Show Details)
epriestley moved this task from Bob to Evan on the Dashboards board.