incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pran...@apache.org
Subject git commit: CLOUDSTACK-1064:A type error occurs when trying to add account/register template: this is because of accounts conext being undefined
Date Fri, 25 Jan 2013 11:21:20 GMT
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 <pranav.saxena@citrix.com>
Authored: Fri Jan 25 16:42:42 2013 +0530
Committer: Pranav Saxena <pranav.saxena@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',


Mime
View raw message