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

More detailed error message when user has no access #784

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

edlerd
Copy link
Collaborator

@edlerd edlerd commented May 28, 2024

Done

  • More detailed error message when user has no access to a project or the project is not found.

Fixes #783

QA

  1. Run the LXD-UI:
    • On the demo server via the link posted by @webteam-app below. This is only available for PRs created by collaborators of the repo. Ask @mas-who or @edlerd for access.
    • With a local copy of this branch, run as described here.
  2. Perform the following QA steps:

Screenshots

image

…to a project or the project is not found. fixes canonical#783

Signed-off-by: David Edler <david.edler@canonical.com>
@webteam-app
Copy link

@mas-who
Copy link
Contributor

mas-who commented May 30, 2024

LGTM, thanks for the improvement 👍

@edlerd I was able to replicate the issue reported in #783 with the --project flag that's missing the 's'. So I don't think there is a bug. Although maybe we should disable the project selector when no projects are returned by the server? Just a suggestion, not critical for this PR.

@edlerd edlerd merged commit d1d2c30 into canonical:main Jun 3, 2024
12 checks passed
@edlerd edlerd deleted the no-project-error branch June 3, 2024 08:00
github-actions bot pushed a commit that referenced this pull request Jun 3, 2024
@edlerd
Copy link
Collaborator Author

edlerd commented Jun 3, 2024

@edlerd I was able to replicate the issue reported in #783 with the --project flag that's missing the 's'. So I don't think there is a bug. Although maybe we should disable the project selector when no projects are returned by the server? Just a suggestion, not critical for this PR.

I was thinking about the project selector, but didn't have a good idea how to improve it in the "no project access" case -- hence I left it as it was.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restricted projects goes to /ui/project/default and print 404
3 participants