[Lens] Allow read only view for users with write permissions but having no write access to the dashboard#247746
Merged
awahab07 merged 8 commits intoelastic:mainfrom Feb 4, 2026
Conversation
Contributor
|
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
Contributor
Author
|
@elasticmachine merge upstream |
…guration-for-non-owners
ThomThomson
approved these changes
Jan 5, 2026
Contributor
ThomThomson
left a comment
There was a problem hiding this comment.
Dashboard changes LGTM! Makes sense to expose the canUserEditDashboard variable from the view mode manager as a static boolean because this will not change over the lifetime of the Dashboard.
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
|
merge conflict between base and head |
…d-dashboards-view-configuration-for-non-owners # Conflicts: # x-pack/platform/plugins/shared/lens/public/react_embeddable/type_guards.ts
markov00
reviewed
Jan 8, 2026
x-pack/platform/plugins/shared/lens/public/react_embeddable/initializers/initialize_edit.tsx
Show resolved
Hide resolved
Contributor
Author
|
@elasticmachine merge upstream |
…guration-for-non-owners
Contributor
Author
|
@elasticmachine merge upstream |
…guration-for-non-owners
Contributor
Author
|
@elasticmachine merge upstream |
…guration-for-non-owners
markov00
approved these changes
Jan 29, 2026
Contributor
Author
|
@elasticmachine merge upstream |
…guration-for-non-owners
Contributor
💔 Build Failed
Failed CI Steps
Test Failures
Metrics [docs]Async chunks
Page load bundle
History
|
Contributor
Author
|
@elasticmachine merge upstream |
…guration-for-non-owners
mbondyra
added a commit
to mbondyra/kibana
that referenced
this pull request
Feb 5, 2026
* commit '5c0872d56bc0268177cd3c7150a1685481fb5238': (221 commits) Add .cursorignore file (elastic#251709) [Search] Add descriptions to semantic_text field inference endpoint select (elastic#249265) [Agent Builder] Agent skills implementation (elastic#251209) [Lens] [ES|QL] Improve types for ES|QL conversion. (elastic#251042) Update the trace waterfall to make it easy to understand (elastic#250442) [ES|QL] [Lens] Adds query stats (elastic#251029) [Lens] Fix KQL character escaping when query is generated from Top values column (breakdown). (elastic#250925) fix(kbn-elastic-assistant): fix a11y issue with missing label on flyout (elastic#251656) Update dependency @elastic/monaco-esql to v3.1.16 (main) (elastic#251666) [Automatic Import V2] Add langsmith tracing (elastic#251592) [scout] fix duplicated test failure reports in Buildkite annotations (elastic#251455) chore(NA): remove us-central1-b from gcp zones on high load jobs (elastic#251748) skip flaky suite (elastic#250973) [Lens] Allow read only view for users with write permissions but having no write access to the dashboard (elastic#247746) [CI] Increase artifacts disk to 180gb (elastic#251774) [content-list] 1. Provider Foundation (elastic#251344) [AI Infra] Add missing ES|QL commands and functions documentation for inference tasks (elastic#249089) [docs-utils] 4️⃣ pre-req: Prepare for new validations (elastic#250810) [APM] Extend React flow service map test coverage (elastic#251624) [scout] discover tests with custom server configs (elastic#251297) ... # Conflicts: # src/platform/plugins/shared/dashboard/tsconfig.json # x-pack/platform/plugins/shared/agent_builder_platform/server/tools/create_visualization/create_visualization.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #236097
Summary
Users with read-only access to write-protected dashboards can now view chart configurations via the "Show visualization configuration" panel action.
Dashboard now exposes
isEditableByUserin its API, which Lens consumes to correctly determine write permissions instead of relying solely on role-based capabilities.Perviously Lens's
isReadOnlyEnabled()only checked role-basedshowWriteControlscapability, ignoring dashboard-level access control. This causedwrite: trueeven for users who couldn't edit a write-protected dashboard, hiding the "Show visualization configuration" action.Before ("Other Editor User", non owner user with write permissions can neither edit the viz, nor can view the config)
write-protected-dashboard-before.mov
After ("Other Editor User" can now view the config)
write-protected-dashboard-after.mov