[prev in list] [next in list] [prev in thread] [next in thread]
List: jboss-cvs-commits
Subject: [jboss-cvs] nukes/nukes/src/main/org/jboss/nukes/core/modules/html HtmlModule.java
From: Sacha Labourey <slaboure () users ! sourceforge ! net>
Date: 2004-01-31 15:29:46
Message-ID: E1Amx46-0007WN-1r () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]
User: slaboure
Date: 04/01/31 07:29:46
Modified: nukes/src/main/org/jboss/nukes/core/modules/html
HtmlModule.java
Log:
- allow overriding of properties in a Override.properties file in the classpath
- ImpactMenuTheme only display sub-menu if allowed to display page
- HTMLModule returns correct Unauthorized access message
Revision Changes Path
1.67 +16 -3 nukes/nukes/src/main/org/jboss/nukes/core/modules/html/HtmlModule.java
Index: HtmlModule.java
===================================================================
RCS file: /cvsroot/jboss/nukes/nukes/src/main/org/jboss/nukes/core/modules/html/HtmlModule.java,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- HtmlModule.java 22 Jan 2004 21:52:22 -0000 1.66
+++ HtmlModule.java 31 Jan 2004 15:29:45 -0000 1.67
@@ -55,7 +55,7 @@
* DELETE/html::/$id:: - delete $id
*
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.66 $
+ * @version $Revision: 1.67 $
*/
public class HtmlModule
extends ModuleSupport
@@ -869,12 +869,25 @@
// Components overrides ------------------------------------------
+ public boolean isAuthorizedToGetResource (String fileId)
+ {
+ return secAuthAction("html::", fileId + "::", Level.ACCESS_READ);
+ }
+
public Resource getResource(String fileId)
{
- if (!secAuthAction("html::", fileId + "::", Level.ACCESS_READ))
+ if (isAuthorizedToGetResource (fileId))
+ {
+ return getResourceNoCheck(fileId);
+ }
+ else
{
return null;
}
+ }
+
+ public Resource getResourceNoCheck(String fileId)
+ {
// Look in the cache first
Resource res = manager.get(fileId);
@@ -1029,7 +1042,7 @@
private void print(Page page, String fileId)
{
- Resource res = getResource(fileId);
+ Resource res = getResourceNoCheck(fileId); // security check done in next print method called
if (res == null || !(res instanceof File))
{
page.sendError("${html._HTMLPAGESIDNOTINDICATED}");
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
jboss-cvs-commits mailing list
jboss-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-cvs-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic