You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2013/08/15 03:00:36 UTC
git commit: updated refs/heads/4.2 to 42f49d0
Updated Branches:
refs/heads/4.2 5189143a1 -> 42f49d031
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/42f49d03
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/42f49d03
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/42f49d03
Branch: refs/heads/4.2
Commit: 42f49d031631506f2f6f40a5832394b898429fee
Parents: 5189143
Author: Jessica Wang <je...@apache.org>
Authored: Wed Aug 14 17:58:39 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Wed Aug 14 17:58:39 2013 -0700
----------------------------------------------------------------------
ui/scripts/affinity.js | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/42f49d03/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);