f-ui: Improve ACL permission error message to prompt sign-in check#27904
f-ui: Improve ACL permission error message to prompt sign-in check#27904sreekanthkk96 wants to merge 5 commits into
Conversation
|
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement Learn more about why HashiCorp requires a CLA and what the CLA includes Have you signed the CLA already but the status is still pending? Recheck it. |
jrasell
left a comment
There was a problem hiding this comment.
Hi @sreekanthkk96 and thanks for raising this PR.
It solves the direct user issue but I wonder if we can improve upon this by passing an isAuthenticated option to messageFromAdapterError which would allow us to show two distinct messages:
- Not signed in:
"You are not signed in. Please sign in to perform this action." - Signed in, insufficient token → `"Your ACL token does not grant permission to ${actionMessage}."
Curious of your thoughts here on UX and implementation?
Co-authored-by: Copilot <copilot@github.com>
…50-nomad-GH-Issue
Hi @jrasell Case 1: User Not Signed In (no token in localStorage) Message: "You are not signed in. Please sign in to perform this action." Case 2: User Signed In with Insufficient Permissions (token exists) Message: "Your ACL token does not grant permission to {action}." |
Description
This PR updates the error message for ACL permission failures to be more actionable by suggesting that users verify they are signed in. Previously, when users encountered a 403 Forbidden error, the message only stated that their ACL token didn't grant permission, which could be confusing for users who weren't logged in at all.
The updated error message now reads:
Your ACL token does not grant permission to ${actionMessage}. Please ensure you are signed in.This change improves the user experience by providing a clear next step when encountering permission errors.
Testing & Reproduction steps
Manual Testing:
To reproduce this error message:
🐛 YOU SHOULD SEE THE ERROR
Links
User Not Signed In

User Signed In with Insufficient Permissions

Contributor Checklist
changelog entry using the
make clcommand.ensure regressions will be caught.
and job configuration, please update the Nomad product documentation, which is stored in the
web-unified-docsrepo. Refer to theweb-unified-docscontributor guide for docs guidelines.Please also consider whether the change requires notes within the upgrade
guide. If you would like help with the docs, tag the
nomad-docsteam in this PR.Reviewer Checklist
backporting document.
in the majority of situations. The main exceptions are long-lived feature branches or merges where
history should be preserved.
within the public repository.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
No changes to security controls. This PR only modifies the error message text to be more user-friendly by suggesting users verify they are signed in when encountering ACL permission errors. The underlying authentication and authorization mechanisms remain unchanged.