mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Warn & Disallow Creating Role with Existing Name (#132218)
* Adds inline warning (name focus/onBlur) and toast warning (saveRole) when attempting to create a role with a name that already exists. Disallows creating a role with a name that already exists. Event handling efficiency needs review. * Updated API documentation. Implemented unit and functional tests. * Added name compare to throttle GET request from onBlur for efficiency. * Reorganized functional and unit tests. Improved UI logic and presentation. * Update x-pack/plugins/security/server/routes/authorization/roles/put.test.ts Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com> * Update x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.test.tsx Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
This commit is contained in:
parent
4317eabbea
commit
cb403a6fa0
7 changed files with 219 additions and 5 deletions
|
@ -51,12 +51,21 @@ To use the create or update role API, you must have the `manage_security` cluste
|
|||
To grant access to all spaces, set to `["*"]`, or omit the value.
|
||||
=====
|
||||
|
||||
[[role-management-api-put-query-params]]
|
||||
==== Query parameters
|
||||
|
||||
`createOnly`::
|
||||
(Optional, boolean) When `true`, will prevent overwriting the role if it already exists.
|
||||
|
||||
[[role-management-api-put-response-codes]]
|
||||
==== Response code
|
||||
|
||||
`204`::
|
||||
Indicates a successful call.
|
||||
|
||||
'409'::
|
||||
When `createOnly` is true, indicates a conflict with an existing role.
|
||||
|
||||
==== Examples
|
||||
|
||||
Grant access to various features in all spaces:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue