mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-495: cloudstack UI - template page - delete template/ISO - fix a JS error "cloudStack.context.projects is null"
This commit is contained in:
parent
27fcb788e9
commit
57aeb17a5f
|
|
@ -1428,7 +1428,7 @@
|
|||
|
||||
// "Delete Template"
|
||||
//if (((isUser() && jsonObj.ispublic == true && !(jsonObj.domainid == g_domainid && jsonObj.account == g_account)))
|
||||
if (((isAdmin() == false && !(jsonObj.domainid == g_domainid && jsonObj.account == g_account) && !(jsonObj.domainid == g_domainid && jsonObj.projectid == cloudStack.context.projects[0].id))) //if neither root-admin, nor the same account, nor the same project
|
||||
if (((isAdmin() == false && !(jsonObj.domainid == g_domainid && jsonObj.account == g_account) && !(jsonObj.domainid == g_domainid && cloudStack.context.projects && jsonObj.projectid == cloudStack.context.projects[0].id))) //if neither root-admin, nor the same account, nor the same project
|
||||
|| (jsonObj.isready == false && jsonObj.status != null && jsonObj.status.indexOf("Downloaded") != -1)
|
||||
|| (jsonObj.account == "system")) {
|
||||
//do nothing
|
||||
|
|
@ -1487,7 +1487,7 @@
|
|||
|
||||
// "Delete ISO"
|
||||
//if (((isUser() && jsonObj.ispublic == true && !(jsonObj.domainid == g_domainid && jsonObj.account == g_account)))
|
||||
if (((isAdmin() == false && !(jsonObj.domainid == g_domainid && jsonObj.account == g_account) && !(jsonObj.domainid == g_domainid && jsonObj.projectid == cloudStack.context.projects[0].id))) //if neither root-admin, nor the same account, nor the same project
|
||||
if (((isAdmin() == false && !(jsonObj.domainid == g_domainid && jsonObj.account == g_account) && !(jsonObj.domainid == g_domainid && cloudStack.context.projects && jsonObj.projectid == cloudStack.context.projects[0].id))) //if neither root-admin, nor the same account, nor the same project
|
||||
|| (jsonObj.isready == false && jsonObj.status != null && jsonObj.status.indexOf("Downloaded") != -1)
|
||||
|| (jsonObj.account == "system")
|
||||
) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue