You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jd...@apache.org on 2009/01/03 21:47:26 UTC

svn commit: r731086 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/SecurePackageResourceGuard.java

Author: jdonnerstag
Date: Sat Jan  3 12:47:26 2009
New Revision: 731086

URL: http://svn.apache.org/viewvc?rev=731086&view=rev
Log:
improve javadoc

Modified:
    wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/SecurePackageResourceGuard.java

Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/SecurePackageResourceGuard.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/SecurePackageResourceGuard.java?rev=731086&r1=731085&r2=731086&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/SecurePackageResourceGuard.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/SecurePackageResourceGuard.java Sat Jan  3 12:47:26 2009
@@ -30,12 +30,37 @@
 
 /**
  * This is a resource guard which by default denies access to all resources and thus is more secure.
- * 
+ * <p/>
  * All pattern are executed in the order they were provided. All pattern are executed to determine
  * if access can be granted or not.
- * 
+ * <p/>
  * Note that access to the config data such as get/setPattern() and acceptXXX() is not synchronized.
  * It is assumed that configuration has finished before the first request gets executed.
+ * <p/>
+ * The rules are fairly simple. Each pattern must start with either "+" (include) or "-" (exclude).
+ * "*" is a placeholder for zero, one or more characters within a file or directory name. "**" is a
+ * placeholder for zero, one or more sub-directories.
+ * <p/>
+ * Examples:
+ * <table border="0">
+ * <tr>
+ * <td>+*.gif</td>
+ * <td>All gif files in all directories</td>
+ * </tr>
+ * <tr>
+ * <td>+test*.*</td>
+ * <td>All files in all directories starting with "test"</td>
+ * </tr>
+ * <tr>
+ * <td>+mydir&#47;*&#47;*.gif</td>
+ * <td>All gif files two levels below the mydir directory. E.g. mydir&#47;dir2&#47;test.gif</td>
+ * </tr>
+ * <tr>
+ * <td>+mydir&#47;**&#47;*.gif</td>
+ * <td>All gif files in all directories below mydir. E.g. mydir&#47;test.gif or
+ * mydir&#47;dir2&#47;dir3&#47;test.gif</td>
+ * </tr>
+ * </table>
  * 
  * @see IPackageResourceGuard
  * @see IResourceSettings#getPackageResourceGuard