cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject git commit: updated refs/heads/4.4 to a636ee4
Date Mon, 14 Apr 2014 21:50:44 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 fd3a0d739 -> a636ee4da


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/a636ee4d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a636ee4d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a636ee4d

Branch: refs/heads/4.4
Commit: a636ee4dab800713c71b0c2bb48e29624525ba98
Parents: fd3a0d7
Author: Min Chen <min.chen@citrix.com>
Authored: Mon Apr 14 14:41:50 2014 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Mon Apr 14 14:41:50 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/a636ee4d/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