mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
cloudstack UI - advanced search - dropdown field - check API permission before making API call.
This commit is contained in:
parent
8ea0a230e6
commit
7b1b9f8e95
@ -56,9 +56,11 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
domainid: {
|
||||
label: 'Domain',
|
||||
select: function(args) {
|
||||
if(isAdmin() || isDomainAdmin()) {
|
||||
$.ajax({
|
||||
url: createURL('listDomains'),
|
||||
data: {
|
||||
@ -78,6 +80,12 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
args.response.success({
|
||||
data: null
|
||||
});
|
||||
}
|
||||
},
|
||||
isHidden: function(args) {
|
||||
if(isAdmin() || isDomainAdmin())
|
||||
@ -86,6 +94,7 @@
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
account: {
|
||||
label: 'Account',
|
||||
isHidden: function(args) {
|
||||
|
||||
@ -86,6 +86,7 @@
|
||||
domainid: {
|
||||
label: 'Domain',
|
||||
select: function(args) {
|
||||
if(isAdmin() || isDomainAdmin()) {
|
||||
$.ajax({
|
||||
url: createURL('listDomains'),
|
||||
data: {
|
||||
@ -105,6 +106,12 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
args.response.success({
|
||||
data: null
|
||||
});
|
||||
}
|
||||
},
|
||||
isHidden: function(args) {
|
||||
if(isAdmin() || isDomainAdmin())
|
||||
|
||||
@ -464,9 +464,11 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
domainid: {
|
||||
label: 'Domain',
|
||||
select: function(args) {
|
||||
if(isAdmin() || isDomainAdmin()) {
|
||||
$.ajax({
|
||||
url: createURL('listDomains'),
|
||||
data: {
|
||||
@ -486,6 +488,12 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
args.response.success({
|
||||
data: null
|
||||
});
|
||||
}
|
||||
},
|
||||
isHidden: function(args) {
|
||||
if(isAdmin() || isDomainAdmin())
|
||||
@ -494,6 +502,7 @@
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
account: {
|
||||
label: 'Account',
|
||||
isHidden: function(args) {
|
||||
@ -3681,9 +3690,11 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
domainid: {
|
||||
label: 'Domain',
|
||||
select: function(args) {
|
||||
if(isAdmin() || isDomainAdmin()) {
|
||||
$.ajax({
|
||||
url: createURL('listDomains'),
|
||||
data: {
|
||||
@ -3703,6 +3714,12 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
args.response.success({
|
||||
data: null
|
||||
});
|
||||
}
|
||||
},
|
||||
isHidden: function(args) {
|
||||
if(isAdmin() || isDomainAdmin())
|
||||
@ -3711,6 +3728,7 @@
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
account: {
|
||||
label: 'Account',
|
||||
isHidden: function(args) {
|
||||
|
||||
@ -647,9 +647,11 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
domainid: {
|
||||
label: 'Domain',
|
||||
select: function(args) {
|
||||
if(isAdmin() || isDomainAdmin()) {
|
||||
$.ajax({
|
||||
url: createURL('listDomains'),
|
||||
data: {
|
||||
@ -669,6 +671,12 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
args.response.success({
|
||||
data: null
|
||||
});
|
||||
}
|
||||
},
|
||||
isHidden: function(args) {
|
||||
if(isAdmin() || isDomainAdmin())
|
||||
@ -677,6 +685,7 @@
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
account: {
|
||||
label: 'Account',
|
||||
isHidden: function(args) {
|
||||
|
||||
@ -297,6 +297,7 @@
|
||||
domainid: {
|
||||
label: 'Domain',
|
||||
select: function(args) {
|
||||
if(isAdmin() || isDomainAdmin()) {
|
||||
$.ajax({
|
||||
url: createURL('listDomains'),
|
||||
data: {
|
||||
@ -316,6 +317,12 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
args.response.success({
|
||||
data: null
|
||||
});
|
||||
}
|
||||
},
|
||||
isHidden: function(args) {
|
||||
if(isAdmin() || isDomainAdmin())
|
||||
@ -324,6 +331,7 @@
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
account: {
|
||||
label: 'Account',
|
||||
isHidden: function(args) {
|
||||
@ -1114,9 +1122,11 @@
|
||||
|
||||
advSearchFields: {
|
||||
name: { label: 'Name' },
|
||||
|
||||
domainid: {
|
||||
label: 'Domain',
|
||||
select: function(args) {
|
||||
if(isAdmin() || isDomainAdmin()) {
|
||||
$.ajax({
|
||||
url: createURL('listDomains'),
|
||||
data: {
|
||||
@ -1136,6 +1146,12 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
args.response.success({
|
||||
data: null
|
||||
});
|
||||
}
|
||||
},
|
||||
isHidden: function(args) {
|
||||
if(isAdmin() || isDomainAdmin())
|
||||
@ -1144,6 +1160,7 @@
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
account: {
|
||||
label: 'Account',
|
||||
isHidden: function(args) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user