Revert listAll behaviour for templates (#9309)

This commit is contained in:
Vishesh 2024-06-28 15:58:44 +05:30 committed by GitHub
parent a5c8bb3bfc
commit d4446ee09d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 14 deletions

View File

@ -4348,7 +4348,7 @@ public class QueryManagerImpl extends MutualExclusiveIdsManagerBase implements Q
Account caller = CallContext.current().getCallingAccount(); Account caller = CallContext.current().getCallingAccount();
Long parentTemplateId = cmd.getParentTemplateId(); Long parentTemplateId = cmd.getParentTemplateId();
boolean listAll = cmd.listAll(); boolean listAll = false;
if (templateFilter != null && templateFilter == TemplateFilter.all) { if (templateFilter != null && templateFilter == TemplateFilter.all) {
if (caller.getType() == Account.Type.NORMAL) { if (caller.getType() == Account.Type.NORMAL) {
throw new InvalidParameterValueException("Filter " + TemplateFilter.all + " can be specified by admin only"); 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(); boolean showRemovedISO = cmd.getShowRemoved();
Account caller = CallContext.current().getCallingAccount(); Account caller = CallContext.current().getCallingAccount();
boolean listAll = cmd.listAll(); boolean listAll = false;
if (isoFilter != null && isoFilter == TemplateFilter.all) { if (isoFilter != null && isoFilter == TemplateFilter.all) {
if (caller.getType() == Account.Type.NORMAL) { if (caller.getType() == Account.Type.NORMAL) {
throw new InvalidParameterValueException("Filter " + TemplateFilter.all + " can be specified by admin only"); throw new InvalidParameterValueException("Filter " + TemplateFilter.all + " can be specified by admin only");

View File

@ -2276,16 +2276,10 @@ export default {
} }
args.zoneid = _.get(this.zone, 'id') args.zoneid = _.get(this.zone, 'id')
args.templatefilter = templateFilter args.templatefilter = templateFilter
if (this.$store.getters.project?.id) {
args.projectid = this.$store.getters.project.id
} else {
args.projectid = -1
}
args.details = 'all' args.details = 'all'
args.showicon = 'true' args.showicon = 'true'
args.id = this.templateId args.id = this.templateId
args.isvnf = false args.isvnf = false
args.listall = true
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
api('listTemplates', args).then((response) => { api('listTemplates', args).then((response) => {
@ -2304,15 +2298,9 @@ export default {
} }
args.zoneid = _.get(this.zone, 'id') args.zoneid = _.get(this.zone, 'id')
args.isoFilter = isoFilter args.isoFilter = isoFilter
if (this.$store.getters.project?.id) {
args.projectid = this.$store.getters.project.id
} else {
args.projectid = -1
}
args.bootable = true args.bootable = true
args.showicon = 'true' args.showicon = 'true'
args.id = this.isoId args.id = this.isoId
args.listall = true
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
api('listIsos', args).then((response) => { api('listIsos', args).then((response) => {