diff --git a/doc/install.html b/doc/install.html index cd048e367..dd40c7a09 100644 --- a/doc/install.html +++ b/doc/install.html @@ -780,65 +780,6 @@ -
false
, which
- means that a cached copy of each template will be used for 60 seconds
- before the disk is checked for a new version.
- false
, which means that the language file is
- read when VIVO starts up, or when a new theme is selected.
- false
.
- false
, which means
-# that a cached copy of each template will be used for 60 seconds before
-# the disk is checked for a new version.
-#
-# developer.defeatFreemarkerCache = true
-
-#
-# For developers only: Setting this option to "true" slows down Vitro performance.
-#
-# Defeat the cache of language-specific text strings, so the language file
-# is read from disk on each request. This permits developers to immediately
-# see the effect of changes to the text strings. The default is
-# false
, which means that the language file is read when
-# VIVO starts up, or when a new theme is selected.
-#
-# developer.defeatI18nCache = true
-
-#
-# For developers only: Setting this option to "true" slows down Vitro performance.
-#
-# Add starting and ending delimiters to each Freemarker template, so you can see
-# which template were invoked by viewing the generated HTML. The default is
-# false
.
-#
-# developer.insertFreemarkerDelimiters = true
-
diff --git a/webapp/rdf/auth/everytime/permission_config.n3 b/webapp/rdf/auth/everytime/permission_config.n3
index 9b61615f2..c4a88018a 100644
--- a/webapp/rdf/auth/everytime/permission_config.n3
+++ b/webapp/rdf/auth/everytime/permission_config.n3
@@ -24,6 +24,7 @@ auth:ADMIN
auth:hasPermission simplePermission:UseMiscellaneousAdminPages ;
auth:hasPermission simplePermission:UseSparqlQueryPage ;
auth:hasPermission simplePermission:PageViewableAdmin ;
+ auth:hasPermission simplePermission:EnableDeveloperPanel ;
# permissions for CURATOR and above.
auth:hasPermission simplePermission:EditOntology ;
diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/permissions/SimplePermission.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/permissions/SimplePermission.java
index cf0a7e272..33c609c5b 100644
--- a/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/permissions/SimplePermission.java
+++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/permissions/SimplePermission.java
@@ -76,6 +76,8 @@ public class SimplePermission extends Permission {
NAMESPACE + "UseAdvancedDataToolsPages");
public static final SimplePermission USE_SPARQL_QUERY_PAGE = new SimplePermission(
NAMESPACE + "UseSparqlQueryPage");
+ public static final SimplePermission ENABLE_DEVELOPER_PANEL = new SimplePermission(
+ NAMESPACE + "EnableDeveloperPanel");
// ----------------------------------------------------------------------
diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/freemarker/config/FreemarkerConfiguration.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/freemarker/config/FreemarkerConfiguration.java
index 17ad1fd0b..7872974bb 100644
--- a/webapp/src/edu/cornell/mannlib/vitro/webapp/freemarker/config/FreemarkerConfiguration.java
+++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/freemarker/config/FreemarkerConfiguration.java
@@ -18,7 +18,6 @@ import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import edu.cornell.mannlib.vitro.webapp.config.ConfigurationProperties;
import edu.cornell.mannlib.vitro.webapp.config.RevisionInfoBean;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.DelimitingTemplateLoader;
@@ -27,6 +26,8 @@ import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.EditConfigurationConstants;
import edu.cornell.mannlib.vitro.webapp.i18n.freemarker.I18nMethodModel;
import edu.cornell.mannlib.vitro.webapp.startup.StartupStatus;
+import edu.cornell.mannlib.vitro.webapp.utils.developer.DeveloperSettings;
+import edu.cornell.mannlib.vitro.webapp.utils.developer.DeveloperSettings.Keys;
import edu.cornell.mannlib.vitro.webapp.web.directives.IndividualShortViewDirective;
import edu.cornell.mannlib.vitro.webapp.web.directives.UrlDirective;
import edu.cornell.mannlib.vitro.webapp.web.directives.WidgetDirective;
@@ -55,18 +56,17 @@ import freemarker.template.TemplateModelException;
* own locale, etc.
*
* Each time a request asks for the configuration, check to see whether the
- * cache is still valid, and whether the theme has changed (needs a new
- * TemplateLoader). Store the request info to the ThreadLocal.
+ * cache is still valid, whether the theme has changed (needs a new
+ * TemplateLoader), and whether the DeveloperSettings have changed (might need a
+ * new TemplateLoader). Store the request info to the ThreadLocal.
*/
public abstract class FreemarkerConfiguration {
private static final Log log = LogFactory
.getLog(FreemarkerConfiguration.class);
- private static final String PROPERTY_DEFEAT_CACHE = "developer.defeatFreemarkerCache";
- private static final String PROPERTY_INSERT_DELIMITERS = "developer.insertFreemarkerDelimiters";
-
private static volatile FreemarkerConfigurationImpl instance;
private static volatile String previousThemeDir;
+ private static volatile Map