From a24589710a3de78cc6706e1f25271de1e0807e69 Mon Sep 17 00:00:00 2001 From: bfederle Date: Fri, 23 Dec 2011 17:06:48 -0500 Subject: [PATCH] Projects list view: 'destroy' fix Fix destroy project not being allowed by admin who is not owner of a project. --- ui/scripts/projects.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/scripts/projects.js b/ui/scripts/projects.js index 8c5650d88f1..3e0804b0868 100644 --- a/ui/scripts/projects.js +++ b/ui/scripts/projects.js @@ -819,7 +819,7 @@ var projectsActionFilter = function(args) { var allowedActions = ['destroy']; - if (args.context.item.account == cloudStack.context.users[0].account || args.context.users[0].role == '1') { + if (args.context.item.account == cloudStack.context.users[0].account || isAdmin()) { if (args.context.item.state == 'Suspended') { allowedActions.push('enable'); } else if (args.context.item.state == 'Active') {