From d4446ee09dcb6361ffef99a0aff7c02752226d9a Mon Sep 17 00:00:00 2001 From: Vishesh Date: Fri, 28 Jun 2024 15:58:44 +0530 Subject: [PATCH] Revert listAll behaviour for templates (#9309) --- .../java/com/cloud/api/query/QueryManagerImpl.java | 4 ++-- ui/src/views/compute/DeployVM.vue | 12 ------------ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/server/src/main/java/com/cloud/api/query/QueryManagerImpl.java b/server/src/main/java/com/cloud/api/query/QueryManagerImpl.java index 58ad44df164..a3a1a16b160 100644 --- a/server/src/main/java/com/cloud/api/query/QueryManagerImpl.java +++ b/server/src/main/java/com/cloud/api/query/QueryManagerImpl.java @@ -4348,7 +4348,7 @@ public class QueryManagerImpl extends MutualExclusiveIdsManagerBase implements Q Account caller = CallContext.current().getCallingAccount(); Long parentTemplateId = cmd.getParentTemplateId(); - boolean listAll = cmd.listAll(); + boolean listAll = false; if (templateFilter != null && templateFilter == TemplateFilter.all) { if (caller.getType() == Account.Type.NORMAL) { throw new InvalidParameterValueException("Filter " + TemplateFilter.all + " can be specified by admin only"); @@ -4798,7 +4798,7 @@ public class QueryManagerImpl extends MutualExclusiveIdsManagerBase implements Q boolean showRemovedISO = cmd.getShowRemoved(); Account caller = CallContext.current().getCallingAccount(); - boolean listAll = cmd.listAll(); + boolean listAll = false; if (isoFilter != null && isoFilter == TemplateFilter.all) { if (caller.getType() == Account.Type.NORMAL) { throw new InvalidParameterValueException("Filter " + TemplateFilter.all + " can be specified by admin only"); diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue index 01e190440b2..95919461644 100644 --- a/ui/src/views/compute/DeployVM.vue +++ b/ui/src/views/compute/DeployVM.vue @@ -2276,16 +2276,10 @@ export default { } args.zoneid = _.get(this.zone, 'id') args.templatefilter = templateFilter - if (this.$store.getters.project?.id) { - args.projectid = this.$store.getters.project.id - } else { - args.projectid = -1 - } args.details = 'all' args.showicon = 'true' args.id = this.templateId args.isvnf = false - args.listall = true return new Promise((resolve, reject) => { api('listTemplates', args).then((response) => { @@ -2304,15 +2298,9 @@ export default { } args.zoneid = _.get(this.zone, 'id') args.isoFilter = isoFilter - if (this.$store.getters.project?.id) { - args.projectid = this.$store.getters.project.id - } else { - args.projectid = -1 - } args.bootable = true args.showicon = 'true' args.id = this.isoId - args.listall = true return new Promise((resolve, reject) => { api('listIsos', args).then((response) => {