cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject git commit: updated refs/heads/master to cc8fc74
Date Tue, 08 Jul 2014 21:20:53 GMT
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 <nitin.mehta@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 <min.chen@citrix.com>
Authored: Mon Apr 21 17:52:39 2014 -0700
Committer: Nitin Mehta <nitin.mehta@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());


Mime
View raw message