Projects list view: 'destroy' fix

Fix destroy project not being allowed by admin who is not owner of a
project.
This commit is contained in:
bfederle 2011-12-23 17:06:48 -05:00
parent 17bf657b71
commit a24589710a
1 changed files with 1 additions and 1 deletions

View File

@ -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') {