roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r428926 - in /incubator/roller/branches/roller_3.0: src/org/apache/roller/ui/rendering/WeblogRequestMapper.java web/WEB-INF/classes/roller.properties
Date Fri, 04 Aug 2006 23:45:54 GMT
Author: agilliland
Date: Fri Aug  4 16:45:53 2006
New Revision: 428926

URL: http://svn.apache.org/viewvc?rev=428926&view=rev
Log:
make set of protected weblog urls configurable.  protected urls are urls that can't be considered
weblog urls by the weblog request mapper.


Modified:
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/WeblogRequestMapper.java
    incubator/roller/branches/roller_3.0/web/WEB-INF/classes/roller.properties

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/WeblogRequestMapper.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/WeblogRequestMapper.java?rev=428926&r1=428925&r2=428926&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/WeblogRequestMapper.java
(original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/WeblogRequestMapper.java
Fri Aug  4 16:45:53 2006
@@ -64,8 +64,19 @@
         
         this.restricted = new HashSet();
         
-        // build restricted list
-        String restrictList = RollerConfig.getProperty("weblogurls.restricted");
+        // build roller restricted list
+        String restrictList = 
+                RollerConfig.getProperty("rendering.weblogMapper.rollerProtectedUrls");
+        if(restrictList != null && restrictList.trim().length() > 0) {
+            String[] restrict = restrictList.split(",");
+            for(int i=0; i < restrict.length; i++) {
+                this.restricted.add(restrict[i]);
+            }
+        }
+        
+        // add user restricted list
+        restrictList = 
+                RollerConfig.getProperty("rendering.weblogMapper.userProtectedUrls");
         if(restrictList != null && restrictList.trim().length() > 0) {
             String[] restrict = restrictList.split(",");
             for(int i=0; i < restrict.length; i++) {
@@ -322,6 +333,8 @@
      * TODO 3.0: some kind of caching
      */
     private boolean isWeblog(String potentialHandle) {
+        
+        log.debug("checking weblog handle "+potentialHandle);
         
         boolean isWeblog = false;
         

Modified: incubator/roller/branches/roller_3.0/web/WEB-INF/classes/roller.properties
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/web/WEB-INF/classes/roller.properties?rev=428926&r1=428925&r2=428926&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/web/WEB-INF/classes/roller.properties (original)
+++ incubator/roller/branches/roller_3.0/web/WEB-INF/classes/roller.properties Fri Aug  4
16:45:53 2006
@@ -84,16 +84,28 @@
 rendering.legacyModels.enabled=false
 
 # The set of default Roller renderer factories.
-rendering.rollerRendererFactories=org.apache.roller.ui.rendering.velocity.VelocityRendererFactory
+rendering.rollerRendererFactories=\
+org.apache.roller.ui.rendering.velocity.VelocityRendererFactory
 
 # The set of user defined renderer factories.  These are prepended to the list above.
 rendering.userRendererFactories=
 
 # The set of default Roller request mappers
-rendering.rollerRequestMappers=org.apache.roller.ui.rendering.WeblogRequestMapper
+rendering.rollerRequestMappers=\
+org.apache.roller.ui.rendering.WeblogRequestMapper
 
 # The set of user defined request mappers.  These are prepended to the list above.
 rendering.userRequestMappers=
+
+# Url path elements which can NEVER be considered a weblog url
+# each represents a url at the application root, i.e. /<elem>/*
+rendering.weblogMapper.rollerProtectedUrls=\
+roller-ui,images,theme,themes,CommentAuthenticatorServlet,\
+index.jsp,favicon.ico,robots.txt,taglibs.jsp,\
+page,flavor,rss,atom,language,search,comments,rsd,resource,xmlrpc,planetrss
+
+# Set of user defined protected urls.  These are added to the set above.
+rendering.weblogMapper.userProtectedUrls=
 
 # Set of models to be made available for weblog page rendering
 rendering.pageModels=\



Mime
View raw message