Skip to content

Commit 7715b3d

Browse files
authored
Improve the error throws when a template to owned by a non root-admin is registered for all zones. (#11170)
1 parent 67a1ea3 commit 7715b3d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/main/java/com/cloud/template/TemplateAdapterBase.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ public TemplateProfile prepare(boolean isIso, long userId, String name, String d
192192

193193
if (!isAdmin && zoneIdList == null && !isRegionStore ) {
194194
// domain admin and user should also be able to register template on a region store
195-
throw new InvalidParameterValueException("Please specify a valid zone Id. Only admins can create templates in all zones.");
195+
throw new InvalidParameterValueException("Template registered for 'All zones' can only be owned a Root Admin account. " +
196+
"Please select specific zone(s).");
196197
}
197198

198199
// check for the url format only when url is not null. url can be null incase of form based upload

0 commit comments

Comments
 (0)