elastic/kibana

Edit role page allows you to exit before changes are saved

Open

#106,576 opened on Jul 22, 2021

View on GitHub
 (2 comments) (0 reactions) (0 assignees)TypeScript (19,065 stars) (8,021 forks)batch import
Team:Securityenhancementgood first issue

Description

Related: #42503

Kibana version: 7.14.0 and earlier

Describe the bug:

Creating (or editing) a role takes several steps:

  • Add ES privileges
  • Add Kibana privileges
  • Click the "Save role" (or "Create role") button

This is particularly easy to overlook when you are adding a Kibana privilege, because there is a filled in "Add Kibana privilege" (or "Update space privilege") button

Steps to reproduce:

  1. Navigate to Stack Management > Roles
  2. Create or edit a role
  3. Change the role and navigate to a different page
  4. Observe that Kibana lets you leave without saving the role

Expected behavior:

  1. The "Add Kibana privilege" (or "Update space privilege") button on the Kibana privileges flyout should be renamed and/or made less prominent (changed to an outline button?); it's too easy to mistake that that actually updates the role when it doesn't. Also, these names should be more similar (perhaps they can both just be "Continue"?)
  2. If changes are detected but not saved, we should probably catch the user before they navigate away from the page. Note that we should make sure session timeout is not negatively impacted.

Screenshots (if relevant):

image

image

Contributor guide