Skip to content

Conversation

codyrancher
Copy link
Member

@codyrancher codyrancher commented Sep 29, 2025

Summary

Fixes #10709

Technical notes summary

Added a route definition which includes the _ blank cluster as a param.

Areas or cases that should be tested

Navigating to the auth configuration from both local and downstream clusters and verifying we always see the local cluster in the url.

Areas which could experience regressions

Navigating to the auth configuration from both local and downstream clusters and verifying we always see the _ blank cluster in the url.

Screenshot/Video

local-auth.mp4

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes
  • The PR has been reviewed in terms of Accessibility

export const useTabCountUpdater = () => {
const tabKey = randomStr();
const updateCount = inject<UpdateCountFn>(UPDATE_COUNT_PROVIDER_KEY);
const updateCount = inject<UpdateCountFn | undefined>(UPDATE_COUNT_PROVIDER_KEY, undefined);
Copy link
Member Author

Choose a reason for hiding this comment

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

This doesn't fix the noted issue but it does resolve a warning I was seeing in the console when a table was rendered outside of a tab.

image

@codyrancher codyrancher changed the title Auth cluster Fixed an issue where the current cluster is used when navigating to the auth configuration portion of the app Sep 29, 2025
to: {
name: 'c-cluster-product-resource',
params: {
product: 'auth', resource: 'management.cattle.io.user', cluster: 'local'
Copy link
Member

Choose a reason for hiding this comment

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

this doesn't feel like the right fix, and will probably error if the user doesn't have access to the local cluster.

will add more detail tomorrow, but the general approach is to keep the current cluster store pointing at the last cluster visited to avoid resetting on navigation when it isn't needed.

in this instance we should use the blank cluster _ and / or fix the place where it's looking at the cluster store

Copy link
Member Author

Choose a reason for hiding this comment

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

Wont the user need access to the local store to be able to touch anything in auth?

Copy link
Member Author

Choose a reason for hiding this comment

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

It did appear to be consistent with how we link to the users page in the same file https://github.com/rancher/dashboard/blob/master/shell/config/product/auth.js#L56-L63

But I'll wait for the details tomorrow.

Copy link
Member

Choose a reason for hiding this comment

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

Auth resources are provided by the management store, which does access the local cluster but not via the steve proxy directly to it (ish). That mechanism is how users can create clusters, projects, bindings, etc in the local cluster without being a member of the local cluster. So users could be granted access to see users & auth but not see general local cluster resources.

https://github.com/rancher/dashboard/blob/master/shell/config/product/auth.js#L56-L63 looks like a bug. Think i put that in a looong time ago.

Think the fix here is to update shell/models/management.cattle.io.projectroletemplatebinding.js projectDetailLocation and possibly clusterDetailLocation to include the correct cluster in params

Copy link
Member Author

Choose a reason for hiding this comment

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

@richard-cox you're right about using the blank cluster; I've gone ahead and switched to blank cluster. However, based on where you think this should be fixed I think you're assuming this pr is trying to fix more than I intended.

There's no longer a problem with how projects are displayed in the Project Roles tab. I thought it would be nice to make our management pages more consistent instead of just closing the issue as already fixed.

local-auth-project.mp4

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.

Users & Authentication keeps the last visited cluster in the URL and causes errors

2 participants