[Dashboards] Write-restricted dashboards UI#233552
Conversation
b2e358b to
efc24fe
Compare
5db9bfb to
9a836d1
Compare
9a836d1 to
13b3038
Compare
8f9b88e to
dcc3d83
Compare
Unfortunately not. The method doesn't exist on Flag implementation details PR: #235659 |
Could |
@jeramysoucy @SiddharthMantri Could you answer this? Would it be possible to implement this? |
Although not directly available on the savedObjects request context, you should be able to call it via the type registry (which is available) as follows: Does that work for this use case? |
Yes this works here. Thanks. @nreese I updated the implementation. |
64b6801
into
elastic:security/read-only-dashboards
💔 Build Failed
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
History
|
Summary
This PR adds the ability to set and change editing permission on dashboards. This action can be performed when creating a new dashboard or when changing an existing one.
Saved objects have a new optional property
accessControlwhich hasownerandaccessModeproperties.accessModecan either bedefaultorwrite_restricted.To enable this feature, a saved object needs to pass
supportsAccessControl: trueduring registration.Only admins and dashboard owner (the author, unless changed) are able to change access mode. Existing dashboards won't have
accessControluntil you change it.For new dashboards
accessControlis added during creation.owneris inferred fromcreatedByandaccessModedepends on the option you select in save dashboard modal.Dashboards existing prior to this feature being added will behave as if they are fully editable (
accessMode: default).The only way in the UI to change
accessModeis in the share modal.Closes: https://github.com/elastic/kibana-team/issues/1582
Testing
This PR has a dependency on another PR, which is not yet merged in. You need to pull in branch from this PR to test the changes locally.
Feature flag
The feature is behind a feature flag, disabled by default. To enable, add this to your config file: