Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting shared saved objects #81605

Closed
arisonl opened this issue Oct 26, 2020 · 5 comments · Fixed by #100424
Closed

Deleting shared saved objects #81605

arisonl opened this issue Oct 26, 2020 · 5 comments · Fixed by #100424
Assignees
Labels
Feature:Saved Objects Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!

Comments

@arisonl
Copy link
Contributor

arisonl commented Oct 26, 2020

When deleting saved objects which are shared across spaces, we should warn the users that the action will cause the deletion of the s.o. from all spaces (in contrast to "unsharing"/removing a s.o. from a space). Perhaps a message explaining so in the delete modal is sufficient?

@arisonl arisonl added the Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! label Oct 26, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@jportner
Copy link
Contributor

Here's the mockup we had for deleting index patterns:

image

We could do something similar here, but I think we'd need to change the messaging a bit because this modal is also used when deleting multiple saved objects. So maybe we could make the same changes to the buttons, but add a callout with text that looks something like this:

Singular

This object is shared to one or more other spaces.
Removing it from this space means it will remain in other spaces.

Plural

At least one of these objects are shared to one or more other spaces.
Removing them from this space means they will remain in other spaces.

Notes:

  1. We should only show this message / these buttons when the Spaces plugin is enabled
  2. I'm not sure if we should treat objects that are shared to "All spaces" differently? It feels like we should, but I'm not sure what meaningful action we could give to the user here -- a user could potentially have permission to delete an "All spaces" object without having permission to unshare it from all spaces.

@arisonl @gchaps what do you think?

@jportner jportner self-assigned this Oct 26, 2020
@jportner
Copy link
Contributor

One important thing has changed since we first made this issue -- we changed the delete action to actually delete the object, instead of just removing it from the current space.

The old mockup above shows two buttons: "Delete everywhere" and "Remove from space". We won't be able to do the latter if the Spaces plugin is not enabled, because the Spaces plugin exposes the HTTP route to handle this. In addition, as I mentioned above, the latter doesn't make a lot of sense when you may have an object that is shared to "All spaces". With the current state of things, such an object cannot be unshared from a single space.

In the interest of time and simplicity, I propose we move forward keeping this as simple as possible, just showing the Delete button with a callout informing the user that they are about to take an action that will affect other spaces. I don't think we should attempt to render an additional column; the modal doesn't have a whole lot of space.

I have a quick mockup below:

image

Thoughts @arisonl @gchaps @legrego ?

@jportner jportner linked a pull request Jun 11, 2021 that will close this issue
@gchaps
Copy link
Contributor

gchaps commented Jun 14, 2021

I got confused over "shared objects" and "saved objects", so how about making this distinction in the text:

Title: 2 of your saved objects are shared
--or-- 2 saved objects are shared

Description: Shared objects are deleted from every space they are in.

Button: Delete x objects
Delete 1 object

@jportner
Copy link
Contributor

image
Looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Saved Objects Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants