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

Dashboard: Loading dashboard settings resets folder id when user/team have admin access to dashboard, but not the folder #25771

Open
marefr opened this issue Jun 23, 2020 · 9 comments
Assignees
Labels
area/dashboard area/frontend prio/future Used by the dashboards squad to prioritise their backlog team/grafana-dashboards Dashboards squad type/bug

Comments

@marefr
Copy link
Member

marefr commented Jun 23, 2020

What happened:
Entered dashboard settings, then saving dashboard returning 403 unauthorized.

What you expected to happen:
Successful save of dashboard.

How to reproduce it (as minimally and precisely as possible):

  1. A user user a with org role Viewer.
  2. user a is member of team b.
  3. A folder folder c with no specific permission for user a or team b.
  4. A dashboard dashboard d in folder c with team b permission to Admin
  5. user a login and opens dashboard d
  6. user a can successfully save the dashboard
  7. user a enters dashboard settings
  8. user a can no longer save the dashboard - 403 unauthorized

Anything else we need to know?:
After investigation seems like loading dashboard settings resets the folder selection to empty/zero and by that the 403 unauthorized is returned since the dashboard is trying to be saved in the General folder.

Environment:

  • Grafana version: master (1bde4de) and 7.0.3
@marefr marefr added this to the 7.0.4 milestone Jun 23, 2020
@marefr marefr added this to Needs triage in Platform Backlog via automation Jun 23, 2020
@dprokop dprokop removed this from Needs triage in Platform Backlog Jun 23, 2020
@dprokop dprokop moved this from To do to In progress in Frontend Platform Backlog Jun 23, 2020
@dprokop
Copy link
Member

dprokop commented Jun 24, 2020

@marefr so the question here is. Should the user have possibility to save the dashboard at all? Since he/she is a viewer within a team which has admin rights for a given dashboard.

@torkelo
Copy link
Member

torkelo commented Jun 24, 2020

This scenario is a bit problematic, not sure if we can support this permission setup well without tricky hacks.

@torkelo
Copy link
Member

torkelo commented Jun 24, 2020

  1. user a can successfully save the dashboard

I am a bit unsure if we should allow a save of a dashboard to a folder you only have view permissions for.

@dprokop
Copy link
Member

dprokop commented Jun 24, 2020

I am a bit unsure if we should allow a save of a dashboard to a folder you only have view permissions for.

yes, I'm actually concerned with this as well. Not sure how the permissions are designed. If it's team or the user permissions that take precedence in such scenario

@marefr
Copy link
Member Author

marefr commented Jun 24, 2020

It's working from an HTTP API/backend perspective. It's definitely an edge case that you can have editor/admin access to a dashboard, but not the folder. However, clearly users are dependent on this feature. I don't understand why dashboard have to make changes to the dashboard model by resetting the folder id when opening the dashboard settings.

@torkelo
Copy link
Member

torkelo commented Jun 24, 2020

It’s just complex to have a drop down with an option that your not allowed to select yourself

@torkelo
Copy link
Member

torkelo commented Jun 24, 2020

For example the folder picker is designed to not show dashboards your now allowed to save to , so this scenario is a bit messy with the folder picker having a value that is not available to choose from

@torkelo
Copy link
Member

torkelo commented Jun 24, 2020

But I think we can solve it

@dprokop
Copy link
Member

dprokop commented Jun 25, 2020

@torkelo @marefr Moving to 7.1

@dprokop dprokop modified the milestones: 7.0.4, 7.1 Jun 25, 2020
@dprokop dprokop moved this from In progress to To do in Frontend Platform Backlog Jun 25, 2020
@mckn mckn modified the milestones: 7.1-beta1, 7.1 Jul 1, 2020
@dprokop dprokop modified the milestones: 7.1, 7.2 Jul 15, 2020
@torkelo torkelo moved this from To do to Bugs in Frontend Platform Backlog Jul 24, 2020
@torkelo torkelo modified the milestones: 7.2.0-beta1, 7.3 Sep 9, 2020
@wbrowne wbrowne removed this from the 7.3.0-beta1 milestone Oct 14, 2020
@wbrowne wbrowne added this to the 7.4 milestone Oct 14, 2020
@mjseaman mjseaman modified the milestone: 7.4.0 Jan 8, 2021
@dprokop dprokop modified the milestones: 7.4.0, 8.0.0 Jan 18, 2021
@mellieA mellieA added area/alerting Grafana Alerting area/alerting-ng and removed area/alerting Grafana Alerting area/alerting-ng labels Jan 26, 2021
@dprokop dprokop modified the milestones: 8.0.0-beta1, 8.0.0-beta2 May 13, 2021
@jackw jackw modified the milestones: 8.0.0-beta2, 8.0.0-beta3 May 20, 2021
@hugohaggmark hugohaggmark modified the milestones: 8.0.0-beta3, 8.0.0 Jun 1, 2021
@oscarkilhed oscarkilhed removed this from the 8.0.0 milestone Jun 3, 2021
@natellium natellium removed this from Bugs (max. 35) in Frontend Platform Backlog Jul 21, 2021
@axelavargas axelavargas added this to To be prioritised in User essentials squad (deprecated) Jul 22, 2021
@kaydelaney kaydelaney moved this from To be prioritised to To new project in User essentials squad (deprecated) Apr 8, 2022
@kaydelaney kaydelaney added the needs investigation for unconfirmed bugs. use type/bug for confirmed bugs, even if they "need" more investigating label Apr 8, 2022
@natellium natellium removed this from To new project in User essentials squad (deprecated) Apr 8, 2022
@usmangt usmangt removed the needs investigation for unconfirmed bugs. use type/bug for confirmed bugs, even if they "need" more investigating label Jul 12, 2022
@natellium natellium added the team/grafana-dashboards Dashboards squad label Jun 23, 2023
@natellium natellium added the prio/future Used by the dashboards squad to prioritise their backlog label Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dashboard area/frontend prio/future Used by the dashboards squad to prioritise their backlog team/grafana-dashboards Dashboards squad type/bug
Projects
Status: 📝 Backlog
Development

No branches or pull requests