mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-7532: Template status is not shown in UI/API response for non-default account users. Show it if the owner of the template is the caller
(cherry picked from commit 42f628c61c)
This commit is contained in:
parent
bd9d57e20c
commit
3b442acdd7
|
|
@ -156,8 +156,8 @@ public class TemplateJoinDaoImpl extends GenericDaoBase<TemplateJoinVO, Long> 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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue