mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-2657: listTemplatePermissions API should also include the owner of the template to the list of users having permission to launch
Changes: - Add template owner to the list of users
This commit is contained in:
parent
7e6f3f94ba
commit
780b45e245
|
|
@ -1553,6 +1553,13 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager,
|
|||
accountNames.add(acct.getAccountName());
|
||||
}
|
||||
}
|
||||
|
||||
// also add the owner if not public
|
||||
if (!template.isPublicTemplate()) {
|
||||
Account templateOwner = _accountDao.findById(template.getAccountId());
|
||||
accountNames.add(templateOwner.getAccountName());
|
||||
}
|
||||
|
||||
return accountNames;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue