canonical / lxd-ui

Easy and accessible container and virtual machine management. A browser interface for LXD
GNU General Public License v3.0
242 stars 30 forks source link

More detailed error message when user has no access #784

Closed edlerd closed 1 month ago

edlerd commented 1 month ago

Done

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:
    • Use restricted user (see #783 for commands) with no projects to access the ui
    • Ensure with granted permissions, the ui is still behaving normal on first load of the root and other urls

Screenshots

image

webteam-app commented 1 month ago

Demo

Jenkins

demos.haus

mas-who commented 1 month ago

LGTM, thanks for the improvement :+1:

@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 commented 1 month ago

@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.