elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.35k stars 7.98k forks source link

[Fleet]: Edit integration fields are not disabled with Role: Integrations- Read and Fleet- Read and sub modules- Read #180657

Open amolnater-qasource opened 1 month ago

amolnater-qasource commented 1 month ago

Kibana Build details:

VERSION: 8.14.0 SNAPSHOT
BUILD: 73095
COMMIT: 4047cc862b9f2a7c4a799805871eb001922e317b

Host OS: All

Role:

Integrations: Read
Fleet: Read
Agents: Read
Agent policies: Read
Settings: Read

image

Preconditions:

  1. 8.14.0-SNAPSHOT Kibana cloud environment should be available.
  2. New User should be created with above defined role.

Steps to reproduce:

  1. From Super user create an agent policy.
  2. Login with New User and navigate to Fleet>Agent policies tab.
  3. Click Agent policy and observe Edit agent policy fields are disabled.
  4. Click integration name and observe Edit integration fields are not disabled.

Expected Result: Edit integration fields should be disabled with Role: Integrations- Read and Fleet- Read and sub modules- Read.

Screen Recording:

https://github.com/elastic/kibana/assets/77374876/d9c3911a-c715-4aa6-9140-397c27954a80

Feature: https://github.com/elastic/ingest-dev/issues/2903

elasticmachine commented 1 month ago

Pinging @elastic/fleet (Team:Fleet)

amolnater-qasource commented 1 month ago

@manishgupta-qasource Please review.

manishgupta-qasource commented 1 month ago

Secondary review for this ticket is Done

nchaulet commented 1 week ago

@jen-huang @kpollich This is an interesting one, we do not have a read only mode for integration the current behavior disable the save button and, we could eventually disable all the fields, but this will have to be done also in plugin with custom editor, do you think we should go that way? or the current behavior is good enought?

jen-huang commented 1 week ago

@nchaulet When I saw this initially I mentally put it at the bottom of the pile because of the work involved (cascading "disabled" state through all the components that make up this form, plus like you said the custom forms from other plugins register). IMO disabling save button is good enough for now and this can be a future enhancement.

Or we could put a more visible "read only" mode callout at the top.