apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2.07k stars 1.1k forks source link

UI: Network 'not found' when displaynetwork=false even when logged in as admin #9386

Open kohrar opened 3 months ago

kohrar commented 3 months ago
ISSUE TYPE
COMPONENT NAME
UI (?)
CLOUDSTACK VERSION
4.19.0
CONFIGURATION

Standard install

OS / ENVIRONMENT

N/A

SUMMARY

When editing a guest network, you can specify 'Display network' to true or false (defaults to true on the UI). When setting this to false, the network immediately becomes hidden even when logged in as admin.

STEPS TO REPRODUCE
  1. Log in to CloudStack UI as admin
  2. Edit any guest network
  3. Set 'Display network' to false
  4. You will be sent to a 404 page immediately even when logged in as an admin.
EXPECTED RESULTS

The hidden network should still be visible as admin on the web UI and hidden only to end users, as per the API documentation:

displaynetwork: an optional field, whether to the display the network to the end user or not.

ACTUAL RESULTS

The hidden network is hidden to everyone including admins on the web UI. There is no way to unhide the network as a result unless you interact with the API / CloudMonkey directly.

rohityadavcloud commented 3 months ago

@kohrar this is by design; you need to pass the displaynetwork=true in the cmk/API which only the root-admin can pass. As a UI hack you can in the network URL, pass this; for example: http://<mgmt server domain/IPO>:8080/client/#/guestnetwork?page=1&pagesize=20&displaynetwork=true

kohrar commented 3 months ago

@rohityadavcloud Thanks for that tip. I can see the network being listed if I pass in displaynetwork=false via the URL.

It still would be nice from a user-experience standpoint if: 1) the admin interface listed all networks, regardless of displaynetwork's setting. 2) the admin interface can view/edit networks that are set to displaynetwork=false.

At the moment, it's possible to change displaynetwork=false via the UI and then have no way to revert setting displaynetwork=false from the same UI. Without digging into understanding the API, this may be confusing and prone to CloudStack installations with hidden networks that admins aren't aware of.