This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch 4.19
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.19 by this push:
     new 7715b3dc298 Improve the error throws when a template to owned by a non 
root-admin is registered for all zones. (#11170)
7715b3dc298 is described below

commit 7715b3dc29876e6a414b9269a0255fb3c3ceff1f
Author: Abhisar Sinha <[email protected]>
AuthorDate: Thu Jul 10 13:09:13 2025 +0530

    Improve the error throws when a template to owned by a non root-admin is 
registered for all zones. (#11170)
---
 server/src/main/java/com/cloud/template/TemplateAdapterBase.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/src/main/java/com/cloud/template/TemplateAdapterBase.java 
b/server/src/main/java/com/cloud/template/TemplateAdapterBase.java
index 74347d1c057..905f4f6124d 100644
--- a/server/src/main/java/com/cloud/template/TemplateAdapterBase.java
+++ b/server/src/main/java/com/cloud/template/TemplateAdapterBase.java
@@ -192,7 +192,8 @@ public abstract class TemplateAdapterBase extends 
AdapterBase implements Templat
 
         if (!isAdmin && zoneIdList == 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. Only admins can create templates in all zones.");
+            throw new InvalidParameterValueException("Template registered for 
'All zones' can only be owned a Root Admin account. " +
+                    "Please select specific zone(s).");
         }
 
         // check for the url format only when url is not null. url can be null 
incase of form based upload

Reply via email to