apache / cloudstack

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

VNF appliances entry in menu does not disappear when VNF is completely denied for a role #8666

Closed dataCobra closed 9 months ago

dataCobra commented 9 months ago
ISSUE TYPE
COMPONENT NAME
API?, UI
CLOUDSTACK VERSION
4.19.0.0
CONFIGURATION

We've set the following rules for our roles which are from Type DomainAdmin and User. deleteVnfTemplate: deny deployVnfAppliance: deny listVnfTemplates: deny registerVnfTemplate: deny updateVnfTemplate: deny

SUMMARY

Other entries in the menu disappear (for example VPC and Public IP addresses) if the corresponding rules are denied for a role. This is not true for the VNF appliances menu entry.

STEPS TO REPRODUCE
  1. Set all rules for vnf to deny for the given role.
  2. Check if the menu entry is still there after applying these changes.
EXPECTED RESULTS
Setting all vnf related rules to deny also remove the menu entry from the view for the role.
ACTUAL RESULTS
Vnf menu entry persists in view even after setting all corresponding rules to deny for the role.
weizhouapache commented 9 months ago

code looks good, no idea why it did not work

        name: 'vnf.appliances',
        component: shallowRef(defineAsyncComponent(() => import('@/views/network/VnfAppliancesTab.vue'))),
        show: () => { return 'deployVnfAppliance' in store.getters.apis }

@dataCobra can you change the global setting vnf.template.appliance.enabled to false and retry ? you probably need to restart cloudstack-management service

dataCobra commented 9 months ago

Hey @weizhouapache,

I've changed the global setting and also restarted the cloudstack-management service.

Sadly the issue still persist.

Edit: I've also cleared the browser cache for the UI.

weizhouapache commented 9 months ago

Hey @weizhouapache,

I've changed the global setting and also restarted the cloudstack-management service.

Sadly the issue still persist.

Edit: I've also cleared the browser cache for the UI.

sounds like a UI bug @dataCobra let me have a look

dataCobra commented 9 months ago

Thank you.

dataCobra commented 9 months ago

Hello,

I can hereby confirm that the PR fixes our problem. The menu entry now disappears as expected when the rules are set to "denied".

Thank you for the quick help.

weizhouapache commented 9 months ago

Hello,

I can hereby confirm that the PR fixes our problem. The menu entry now disappears as expected when the rules are set to "denied".

Thank you for the quick help.

thanks @dataCobra for the testing closing as #8668 is merged