From 1ec6235272e8149b2ae56a9d9f7a83a107fe5f2b Mon Sep 17 00:00:00 2001 From: kohsuke Date: Sat, 3 Jan 2009 18:54:05 +0000 Subject: [PATCH] MyView only makes sense when the security is enabled. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14120 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/model/MyView.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/src/main/java/hudson/model/MyView.java b/core/src/main/java/hudson/model/MyView.java index 5556533476..90a530b46c 100644 --- a/core/src/main/java/hudson/model/MyView.java +++ b/core/src/main/java/hudson/model/MyView.java @@ -77,6 +77,15 @@ public class MyView extends View { super(MyView.class); } + /** + * If the security is not enabled, there's no point in having + * this type of views. + */ + @Override + public boolean isInstantiable() { + return Hudson.getInstance().isUseSecurity(); + } + public String getDisplayName() { return Messages.MyView_DisplayName(); } -- GitLab