You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ni...@apache.org on 2014/07/08 23:20:53 UTC
git commit: updated refs/heads/master to cc8fc74
Repository: cloudstack
Updated Branches:
refs/heads/master f4d203475 -> cc8fc746d
CLOUDSTACK-6468:IAM - Templates - Admin user is not allowed to edit
template and set isExtractable() paramater.
(cherry picked from commit b6617843d258d9437a17d39e698edba430768f9a)
Signed-off-by: Nitin Mehta <ni...@citrix.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cc8fc746
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cc8fc746
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cc8fc746
Branch: refs/heads/master
Commit: cc8fc746df4f6138653ac7b28a0110128664a53c
Parents: f4d2034
Author: Min Chen <mi...@citrix.com>
Authored: Mon Apr 21 17:52:39 2014 -0700
Committer: Nitin Mehta <ni...@citrix.com>
Committed: Tue Jul 8 14:20:45 2014 -0700
----------------------------------------------------------------------
server/src/com/cloud/template/TemplateManagerImpl.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cc8fc746/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 7876a5a..f5ad97f 100755
--- a/server/src/com/cloud/template/TemplateManagerImpl.java
+++ b/server/src/com/cloud/template/TemplateManagerImpl.java
@@ -1263,8 +1263,8 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager,
if (isExtractable != null) {
// Only Root admins allowed to change it for templates
- if (!template.getFormat().equals(ImageFormat.ISO) && _accountMgr.isRootAdmin(caller.getId())) {
- throw new InvalidParameterValueException("Only ROOT admins are allowed to modify this attribute.");
+ if (!template.getFormat().equals(ImageFormat.ISO) && !_accountMgr.isRootAdmin(caller.getId())) {
+ throw new InvalidParameterValueException("Only ROOT admins are allowed to modify isExtractable attribute.");
} else {
// For Isos normal user can change it, as their are no derivatives.
updatedTemplate.setExtractable(isExtractable.booleanValue());