You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pr...@apache.org on 2013/01/25 12:21:20 UTC

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

Updated Branches:
  refs/heads/master 9deea9bb5 -> 44ceff422


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


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/44ceff42
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/44ceff42
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/44ceff42

Branch: refs/heads/master
Commit: 44ceff422477411107c0355d09ad2b0a9facfed0
Parents: 9deea9b
Author: Pranav Saxena <pr...@citrix.com>
Authored: Fri Jan 25 16:42:42 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Fri Jan 25 16:42:42 2013 +0530

----------------------------------------------------------------------
 ui/scripts/accounts.js |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/44ceff42/ui/scripts/accounts.js
----------------------------------------------------------------------
diff --git a/ui/scripts/accounts.js b/ui/scripts/accounts.js
index 59e9d8b..4c327ee 100644
--- a/ui/scripts/accounts.js
+++ b/ui/scripts/accounts.js
@@ -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',