Skip to content

fix(intergral/dashboards): refresh permissions before redirect after save#58

Open
jhawksley-intergral wants to merge 5 commits into12.3.x-intergralfrom
bug/dashboard-permissions
Open

fix(intergral/dashboards): refresh permissions before redirect after save#58
jhawksley-intergral wants to merge 5 commits into12.3.x-intergralfrom
bug/dashboard-permissions

Conversation

@jhawksley-intergral
Copy link

Summary

  • Fix transient "not allowed to view" error after saving a new dashboard
  • Caused by a race condition: redirect fires before the user's permission cache is refreshed with the new dashboard's permissions
  • Await contextSrv.fetchUserPermissions() before locationService.replace() in the save handler

🤖 Generated with Claude Code

…save

Await contextSrv.fetchUserPermissions() before navigating to a newly
saved dashboard. Without this, the redirect can hit stale cached
permissions, causing a transient "not allowed to view" error.

- Add contextSrv import
- Await permission refresh before locationService.replace()

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use github.head_ref for PRs (source branch name) instead of
github.ref_name (which resolves to the merge ref e.g. "58/merge").
Add Compute image tag step to replace / with - in branch names.

Matches the workflow from feat/alerting-partitioner.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…board create

- Expand ClearUserPermissionCache to also clear basic role caches
  (Editor/Viewer) so managed role permissions for newly created
  dashboards are picked up on the next request
- Add ClearCacheFor method to Resolvers for targeted scope cache
  invalidation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…irect after save

In multi-instance deployments, the instance serving the redirect after
saving a new dashboard may not have the dashboard or its permissions
propagated yet, resulting in "Not found" or "Not allowed to view".

- Add waitForDashboardReady() that polls the dashboard DTO API
  (up to 8 attempts, 500ms apart) before redirecting
- Applies to new dashboards and save-as-copy

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant