mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
cloudstack 3.0 UI - Instances page - VM Wizard - select network step - VPC filter - list only VPCs belonging to the current login (i.e. If the current login is root-admin, do not show VPCs belonging to regular-user/domain-admin in Instances page's VM Wizard.)
This commit is contained in:
parent
4b3af0c961
commit
ccf99beaed
@ -322,12 +322,10 @@
|
|||||||
|
|
||||||
var networkObjs, vpcObjs;
|
var networkObjs, vpcObjs;
|
||||||
|
|
||||||
// Get VPCs
|
//listVPCs without account/domainid/listAll parameter will return only VPCs belonging to the current login. That's what should happen in Instances page's VM Wizard.
|
||||||
|
//i.e. If the current login is root-admin, do not show VPCs belonging to regular-user/domain-admin in Instances page's VM Wizard.
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL('listVPCs'),
|
url: createURL('listVPCs'),
|
||||||
data: isDomainAdmin() ?
|
|
||||||
{ account: args.context.users[0].account, domainid: args.context.users[0].domainid } :
|
|
||||||
{ listAll: true },
|
|
||||||
async: false,
|
async: false,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
vpcObjs = json.listvpcsresponse.vpc ? json.listvpcsresponse.vpc : [];
|
vpcObjs = json.listvpcsresponse.vpc ? json.listvpcsresponse.vpc : [];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user