mirror of https://github.com/apache/cloudstack.git
bug 12611
Fix action filter for projects user management status 12611: resolved fixed
This commit is contained in:
parent
e119615fcb
commit
ebe787704b
|
|
@ -379,17 +379,12 @@
|
|||
}
|
||||
},
|
||||
actionPreFilter: function(args) {
|
||||
if (!cloudStack.context.projects) { // This is for the new project wizard
|
||||
if (!cloudStack.context.projects &&
|
||||
args.context.multiRule[0].role != 'Admin') { // This is for the new project wizard
|
||||
return ['destroy'];
|
||||
}
|
||||
|
||||
var project = cloudStack.context.projects[0];
|
||||
var projectOwner = project.account;
|
||||
var rowAccount = args.context.multiRule[0].account;
|
||||
var userAccount = cloudStack.context.users[0].account;
|
||||
var isEditableRow = rowAccount != projectOwner && userAccount == projectOwner;
|
||||
|
||||
if (isEditableRow) {
|
||||
if (args.context.multiRule[0].role != 'Admin') {
|
||||
return args.context.actions;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue