cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject [1/4] git commit: updated refs/heads/master to 29f3914
Date Fri, 18 Apr 2014 01:40:24 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master c4b0a1e2d -> 29f39149b


CLOUDSTACK-5960: Remove another check preventing Domain admin and
normal user from registering template in S3.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cdd39a88
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cdd39a88
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cdd39a88

Branch: refs/heads/master
Commit: cdd39a88ba315a66a408b77ba5b434346575bb71
Parents: c4b0a1e
Author: Min Chen <min.chen@citrix.com>
Authored: Mon Apr 14 14:41:50 2014 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Thu Apr 17 18:32:43 2014 -0700

----------------------------------------------------------------------
 server/src/com/cloud/template/TemplateAdapterBase.java | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cdd39a88/server/src/com/cloud/template/TemplateAdapterBase.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/template/TemplateAdapterBase.java b/server/src/com/cloud/template/TemplateAdapterBase.java
index 3465174..c84132d 100755
--- a/server/src/com/cloud/template/TemplateAdapterBase.java
+++ b/server/src/com/cloud/template/TemplateAdapterBase.java
@@ -179,7 +179,7 @@ public abstract class TemplateAdapterBase extends AdapterBase implements
Templat
 
         if (!isAdmin && zoneId == null && !isRegionStore ) {
             // domain admin and user should also be able to register template on a region
store
-            throw new InvalidParameterValueException("Please specify a valid zone Id.");
+            throw new InvalidParameterValueException("Please specify a valid zone Id. Only
admins can create templates in all zones.");
         }
 
         if (url.toLowerCase().contains("file://")) {
@@ -209,10 +209,6 @@ public abstract class TemplateAdapterBase extends AdapterBase implements
Templat
 
         _resourceLimitMgr.checkResourceLimit(templateOwner, ResourceType.template);
 
-        if (!_accountMgr.isRootAdmin(templateOwner.getId()) && zoneId == null) {
-            throw new IllegalArgumentException("Only admins can create templates in all zones");
-        }
-
         // If a zoneId is specified, make sure it is valid
         if (zoneId != null) {
             DataCenterVO zone = _dcDao.findById(zoneId);


Mime
View raw message