diff --git a/server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java index d3e125341ac..4e33728df20 100644 --- a/server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java +++ b/server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java @@ -156,8 +156,8 @@ public class TemplateJoinDaoImpl extends GenericDaoBase im templateResponse.setDomainId(template.getDomainUuid()); templateResponse.setDomainName(template.getDomainName()); - // If the user is an Admin, add the template download status - if (view == ResponseView.Full) { + // If the user is an 'Admin' or 'the owner of template', add the template download status + if (view == ResponseView.Full || template.getAccountId() == CallContext.current().getCallingAccount().getId() ) { String templateStatus = getTemplateStatus(template); if (templateStatus != null) { templateResponse.setStatus(templateStatus);