Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only display dashboards with write permissions in add to dashboard menu #4505

Merged
merged 5 commits into from
Jan 24, 2018

Conversation

edmundoa
Copy link
Contributor

This PR ensures users can only see dashboards with write permissions in the add to dashboard menu. Additionally it makes the state in DashboardsStore.list() consistent by using ImmutableJS in all its properties, and it ensures the permissions in DashboardsStore are set when the store is first initialized. I also added a couple of tests, to ensure all cases are doing what they should.

Fixes #4504

Edmundo Alvarez added 4 commits January 23, 2018 12:34
@edmundoa edmundoa added this to the 3.0.0 milestone Jan 23, 2018
@ghost ghost assigned edmundoa Jan 23, 2018
@edmundoa
Copy link
Contributor Author

This PR should also be backported into the 2.4 branch.

@edmundoa
Copy link
Contributor Author

I didn't fix all linter errors in AddToDashboardMenu.jsx because they are not related to the changes and will introduce some noise and even some possible bugs in the code.

@kmerz
Copy link
Member

kmerz commented Jan 23, 2018

LGTM 👍

@kmerz kmerz merged commit 9f11d8f into master Jan 24, 2018
@ghost ghost removed the ready-for-review label Jan 24, 2018
@kmerz kmerz deleted the issue-4504 branch January 24, 2018 10:01
kmerz pushed a commit that referenced this pull request Jan 24, 2018
…nu (#4505)

* Add tests for issue

* Only display dashboards with write access in menu

* Update current user permissions with the initial state

* Make writableDashboards consistent with dashboards

This store is using ImmutableJS to store the dashboards state, and it
should do the same with the writableDashboards

* Fix eslint errors on test
edmundoa pushed a commit that referenced this pull request Jan 24, 2018
…nu (#4505) (#4511)

* Add tests for issue

* Only display dashboards with write access in menu

* Update current user permissions with the initial state

* Make writableDashboards consistent with dashboards

This store is using ImmutableJS to store the dashboards state, and it
should do the same with the writableDashboards

* Fix eslint errors on test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants