mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 10:32:34 +01:00
bug 12334: Don't show destroy action to non-owners of project
status 12334: resolved fixed
This commit is contained in:
parent
b71006367d
commit
c9e7f3a1c0
@ -282,7 +282,8 @@
|
|||||||
async: true,
|
async: true,
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
args.response.success({
|
args.response.success({
|
||||||
data: data.listprojectsresponse.project
|
data: data.listprojectsresponse.project,
|
||||||
|
actionFilter: projectsActionFilter
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -355,4 +356,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var projectsActionFilter = function(args) {
|
||||||
|
if (args.context.item.account == args.context.users[0].account) {
|
||||||
|
return ['destroy'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return [];
|
||||||
|
};
|
||||||
} (cloudStack, testData));
|
} (cloudStack, testData));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user