You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sa...@apache.org on 2013/05/24 18:28:44 UTC
[29/50] [abbrv] git commit: updated refs/heads/vmware-storage-motion
to 202b103
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
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/780b45e2
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/780b45e2
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/780b45e2
Branch: refs/heads/vmware-storage-motion
Commit: 780b45e245aba1ca99d12fd4a8de88999642b4ae
Parents: 7e6f3f9
Author: Prachi Damle <pr...@cloud.com>
Authored: Thu May 23 16:32:34 2013 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Thu May 23 16:33:07 2013 -0700
----------------------------------------------------------------------
.../com/cloud/template/TemplateManagerImpl.java | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/780b45e2/server/src/com/cloud/template/TemplateManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/template/TemplateManagerImpl.java b/server/src/com/cloud/template/TemplateManagerImpl.java
index d4976cd..517d4ba 100755
--- a/server/src/com/cloud/template/TemplateManagerImpl.java
+++ b/server/src/com/cloud/template/TemplateManagerImpl.java
@@ -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;
}