Skip to content

Commit a245897

Browse files
committed
Projects list view: 'destroy' fix
Fix destroy project not being allowed by admin who is not owner of a project.
1 parent 17bf657 commit a245897

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎ui/scripts/projects.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@
819819
var projectsActionFilter = function(args) {
820820
var allowedActions = ['destroy'];
821821

822-
if (args.context.item.account == cloudStack.context.users[0].account || args.context.users[0].role == '1') {
822+
if (args.context.item.account == cloudStack.context.users[0].account || isAdmin()) {
823823
if (args.context.item.state == 'Suspended') {
824824
allowedActions.push('enable');
825825
} else if (args.context.item.state == 'Active') {

0 commit comments

Comments
 (0)