mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Revert listAll behaviour for templates (#9309)
This commit is contained in:
parent
a5c8bb3bfc
commit
d4446ee09d
@ -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");
|
||||||
|
|||||||
@ -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) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user