CLOUDSTACK-1064:A type error occurs when trying to add account/register template: this is because of accounts conext being undefined

This commit is contained in:
Pranav Saxena 2013-01-25 16:42:42 +05:30
parent 9deea9bb55
commit 44ceff4224

View File

@ -642,12 +642,16 @@
},
vmLimit: {
label: 'label.instance.limits',
isEditable: function(context) {
isEditable: function(context) {
if(context.accounts == undefined)
return false;
else {
if (context.accounts[0].accounttype == roleTypeUser || context.accounts[0].accounttype == roleTypeDomainAdmin) //updateResourceLimits is only allowed on account whose type is user or domain-admin
return true;
else
return false;
}
} }
},
ipLimit: {
label: 'label.ip.limits',