cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: updated refs/heads/master to 7dd653d
Date Thu, 15 Aug 2013 01:01:15 GMT
Updated Branches:
  refs/heads/master fc202bcfd -> 7dd653d24


CLOUDSTACK-4302: UI > affinity group > hide delete action when affinity group type is
ExplicitDedication for regular user.


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

Branch: refs/heads/master
Commit: 7dd653d24a6001a0718c73ef815d12194151f1e8
Parents: fc202bc
Author: Jessica Wang <jessicawang@apache.org>
Authored: Wed Aug 14 17:58:39 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Wed Aug 14 18:01:04 2013 -0700

----------------------------------------------------------------------
 ui/scripts/affinity.js | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7dd653d2/ui/scripts/affinity.js
----------------------------------------------------------------------
diff --git a/ui/scripts/affinity.js b/ui/scripts/affinity.js
index a491c91..b0011ae 100644
--- a/ui/scripts/affinity.js
+++ b/ui/scripts/affinity.js
@@ -194,6 +194,7 @@
                                 success: function(json) {
                                     var item = json.listaffinitygroupsresponse.affinitygroup[0];
                                     args.response.success({
+                                    	actionFilter: affinitygroupActionfilter,
                                         data: item
                                     });
                                 }
@@ -204,4 +205,14 @@
             }
         }
     };
+       
+    var affinitygroupActionfilter = function(args) {
+        var jsonObj = args.context.item;
+        var allowedActions = [];       
+        if (jsonObj.type != 'ExplicitDedication' || isAdmin()) {
+            allowedActions.push("remove");            
+        }    
+        return allowedActions;
+    }
+       
 })(cloudStack);


Mime
View raw message