Skip to content

Commit 44ceff4

Browse files
committed
CLOUDSTACK-1064:A type error occurs when trying to add account/register template: this is because of accounts conext being undefined
1 parent 9deea9b commit 44ceff4

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

ui/scripts/accounts.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,12 +642,16 @@
642642
},
643643
vmLimit: {
644644
label: 'label.instance.limits',
645-
isEditable: function(context) {
645+
isEditable: function(context) {
646+
647+
if(context.accounts == undefined)
648+
return false;
649+
else {
646650
if (context.accounts[0].accounttype == roleTypeUser || context.accounts[0].accounttype == roleTypeDomainAdmin) //updateResourceLimits is only allowed on account whose type is user or domain-admin
647651
return true;
648652
else
649653
return false;
650-
}
654+
} }
651655
},
652656
ipLimit: {
653657
label: 'label.ip.limits',

0 commit comments

Comments
 (0)