Skip to content

Conversation

@nreese
Copy link
Contributor

@nreese nreese commented Feb 15, 2019

This PR adds isReadOnly mode to the ui store. When true,

  1. LayerControl does not display Add layer button
  2. TOC layers can not be sorted
  3. layer details panel can not be opened.

The reason for large number of changes is this PR starts to add jest snapshot tests for the LayerControl to verify isReadOnly flag does the above actions.

screen shot 2019-02-15 at 2 05 39 pm

@nreese nreese added Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 v7.2.0 labels Feb 15, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis

@nreese
Copy link
Contributor Author

nreese commented Feb 15, 2019

This is a known issue that is getting addressed in EUI - elastic/eui#1571 and will go away with an EUI upgrade. The PR switches button to EuiLink for the TOCEntry and color text is currently unsupported until the EUI PR is merged.

screen shot 2019-02-15 at 2 10 29 pm

@nreese
Copy link
Contributor Author

nreese commented Feb 15, 2019

To test, just manually edit

and set isReadOnly mode to true

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@nreese nreese mentioned this pull request Feb 19, 2019
8 tasks
Copy link
Contributor

@thomasneirynck thomasneirynck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice. +1 on just managing this in the store as opposed to getting this setting from some static module function. it will keep it aligned with the other UI-state.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@nreese nreese merged commit 425539e into elastic:master Feb 20, 2019
@nreese
Copy link
Contributor Author

nreese commented Feb 20, 2019

7.x backport blocked by #31550

nreese added a commit to nreese/kibana that referenced this pull request Feb 20, 2019
* hide add layer button in read only mode

* update TOCEntry for read only mode

* make LayerTOC read only

* default isReadOnly to false

* remove action creator until its beig used
nreese added a commit that referenced this pull request Feb 20, 2019
* hide add layer button in read only mode

* update TOCEntry for read only mode

* make LayerTOC read only

* default isReadOnly to false

* remove action creator until its beig used
@alexfrancoeur
Copy link

@nreese if a role has read only access to a space, is this the mode that will now be presented to them?

@alexfrancoeur
Copy link

And if so, would it close this in your opinion? #30313

@nreese
Copy link
Contributor Author

nreese commented Feb 21, 2019

if a role has read only access to a space, is this the mode that will now be presented to them?

yes

And if so, would it close this in your opinion? #30313

Not yet. Lets keep #30313 open until we wire together the user roles and isReadOnly

@alexfrancoeur
Copy link

👍 sounds good, thanks @nreese

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:enhancement Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v7.2.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants