You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/03/09 11:01:23 UTC

[GitHub] [cloudstack] soreana commented on a change in pull request #4774: Added configuration and Integration test to restrict public template …

soreana commented on a change in pull request #4774:
URL: https://github.com/apache/cloudstack/pull/4774#discussion_r590224553



##########
File path: engine/components-api/src/main/java/com/cloud/template/TemplateManager.java
##########
@@ -42,14 +42,16 @@
 public interface TemplateManager {
     static final String AllowPublicUserTemplatesCK = "allow.public.user.templates";
     static final String TemplatePreloaderPoolSizeCK = "template.preloader.pool.size";
+    static final String RestrictPublicTemplateAccessToDomainCK = "restrict.public.template.access.to.domain";
 
     static final ConfigKey<Boolean> AllowPublicUserTemplates = new ConfigKey<Boolean>("Advanced", Boolean.class, AllowPublicUserTemplatesCK, "true",
         "If false, users will not be able to create public templates.", true, ConfigKey.Scope.Account);
 
     static final ConfigKey<Integer> TemplatePreloaderPoolSize = new ConfigKey<Integer>("Advanced", Integer.class, TemplatePreloaderPoolSizeCK, "8",
             "Size of the TemplateManager threadpool", false, ConfigKey.Scope.Global);
 
-
+    static final ConfigKey<Boolean> RestrictPublicTemplateAccessToDomain = new ConfigKey<>("Advanced", Boolean.class, RestrictPublicTemplateAccessToDomainCK, "false",
+            "If true, the public template wouldn't share between domains", true, ConfigKey.Scope.Global);

Review comment:
       We want to enforce that as a root admin. We don't want to allow our customer share templates. If the shared template caused an issue, we don't want to be responsible for it.
   Btw, we can move it to zone level.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org