fix(core): don't show no-access page to users who have app access#7769
Merged
Conversation
…e app access Users who actually have app access could still land on the "You do not have any access to any app, contact administrator." page (and global admins could land on the initial-setup page). This happened when a user first logged in with no access (e.g. SSO auto-provisioning), was later granted access, and logged in again: the dead-end route had been stored as the last-visited page and was restored on the next login, and that view renders purely from the route without re-checking that the member now has apps. Guard both dead-end routes so an authorized member is redirected to their default app instead of being shown the page: - plugins/plugins account-settings: /account-settings/no-access - core onboarding: /initial-setup Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
5153157 to
da1c970
Compare
Cookiezaurs
approved these changes
Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Users who do have app access could still land on the "You do not have any access to any app, contact administrator." page — the same page shown to brand-new users with no access. Global admins could similarly land on the initial-setup page. It was intermittent and survived re-login.
Root cause
/account-settings/no-access(or a global admin with no apps →/initial-setup).countlyGlobal.appsis now populated.The app id is present in the URL and the app is fully usable (the sidebar loads, and a direct app link works). Only the landing route was stale.
Fix
Guard both dead-end routes so an authorized member (apps present) is redirected to their default app instead of being shown the page:
plugins/pluginsaccount-settings route —/account-settings/no-access/initial-setupThis is route-level and precise: it catches the dead-end no matter how it was reached, with no fragile URL string-matching.
🤖 Generated with Claude Code