Author: metskem
Date: Tue Dec 15 19:26:03 2009
New Revision: 890953
URL: http://svn.apache.org/viewvc?rev=890953&view=rev
Log:
3.0.0-svn-192
* JSPWIKI-618: Allow Administrators to override attachment.maxsize
(reported by Jurgen Weber)
Modified:
incubator/jspwiki/trunk/ChangeLog
incubator/jspwiki/trunk/etc/jspwiki.properties
incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java
incubator/jspwiki/trunk/src/java/org/apache/wiki/attachment/AttachmentServlet.java
Modified: incubator/jspwiki/trunk/ChangeLog
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=890953&r1=890952&r2=890953&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Tue Dec 15 19:26:03 2009
@@ -1,3 +1,9 @@
+2009-12-15 Harry Metske <[email protected]>
+
+ * 3.0.0-svn-192
+
+ * JSPWIKI-618: Allow Administrators to override attachment.maxsize
(reported by Jurgen Weber)
+
2009-12-11 Andrew Jaquith <ajaquith AT apache DOT org>
* 3.0.0-svn-191.
Modified: incubator/jspwiki/trunk/etc/jspwiki.properties
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/etc/jspwiki.properties?rev=890953&r1=890952&r2=890953&view=diff
==============================================================================
--- incubator/jspwiki/trunk/etc/jspwiki.properties (original)
+++ incubator/jspwiki/trunk/etc/jspwiki.properties Tue Dec 15 19:26:03 2009
@@ -93,6 +93,7 @@
# You can limit the maximum size of an attachment by setting this
# value. The value is in bytes, and by default all attachments
# are accepted.
+# This limit is not enforced for users with AdminPermissions.
#
# The following line would limit the attachment size to 100,000 bytes
#jspwiki.attachment.maxsize=100000
@@ -102,6 +103,7 @@
# can allow some types only, or forbid some other types. By default,
# all file types are allowed (if you do not specify the "allow" list
# at all or it is empty).
+# These allow/forbid statements are not enforced for users with
AdminPermissions.
#
# These both are space-separated lists of file suffixes
#
Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java?rev=890953&r1=890952&r2=890953&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java Tue Dec 15
19:26:03 2009
@@ -77,7 +77,7 @@
* <p>
* If the build identifier is empty, it is not added.
*/
- public static final String BUILD = "191";
+ public static final String BUILD = "192";
/**
* This is the generic version string you should use
Modified:
incubator/jspwiki/trunk/src/java/org/apache/wiki/attachment/AttachmentServlet.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/attachment/AttachmentServlet.java?rev=890953&r1=890952&r2=890953&view=diff
==============================================================================
---
incubator/jspwiki/trunk/src/java/org/apache/wiki/attachment/AttachmentServlet.java
(original)
+++
incubator/jspwiki/trunk/src/java/org/apache/wiki/attachment/AttachmentServlet.java
Tue Dec 15 19:26:03 2009
@@ -543,7 +543,10 @@
ServletFileUpload upload = new ServletFileUpload(factory);
upload.setHeaderEncoding("UTF-8");
- upload.setFileSizeMax( m_maxSize );
+ if( !context.hasAdminPermissions() )
+ {
+ upload.setFileSizeMax( m_maxSize );
+ }
upload.setProgressListener( pl );
List<FileItem> items = upload.parseRequest( req );