Author: jaz
Date: Thu Apr 30 05:53:08 2009
New Revision: 770077
URL:
http://svn.apache.org/viewvc?rev=770077&view=revLog:
integration with new Authz API - JIRA OFBIZ-2381
(only added to ContextMapper)
Modified:
ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerContextMapper.java
Modified: ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerContextMapper.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerContextMapper.java?rev=770077&r1=770076&r2=770077&view=diff==============================================================================
--- ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerContextMapper.java (original)
+++ ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerContextMapper.java Thu Apr 30 05:53:08 2009
@@ -39,6 +39,7 @@
import org.ofbiz.entity.cache.Cache;
import org.ofbiz.entity.util.EntityUtil;
import org.ofbiz.security.SecurityFactory;
+import org.ofbiz.security.authz.AuthorizationFactory;
import org.ofbiz.service.GenericDispatcher;
import org.ofbiz.service.GenericServiceException;
import org.ofbiz.service.LocalDispatcher;
@@ -82,13 +83,16 @@
request.setAttribute("servletContext", context);
Object delegator = context.getAttribute("delegator");
Object dispatcher = context.getAttribute("dispatcher");
+ Object authz = context.getAttribute("authz");
Object security = context.getAttribute("security");
request.setAttribute("delegator", delegator);
request.setAttribute("dispatcher", dispatcher);
+ request.setAttribute("authz", authz);
request.setAttribute("security", security);
// FIXME!!! These next two are a hack until proper fake/wrapped session support is done in webslinger
servletContext.setAttribute("delegator", delegator);
servletContext.setAttribute("dispatcher", dispatcher);
+ servletContext.setAttribute("authz", authz);
servletContext.setAttribute("security", security);
}
@@ -97,6 +101,7 @@
GenericDelegator delegator = GenericDelegator.getGenericDelegator(ofbizLayout.delegatorName);
context.setAttribute("delegator", delegator);
context.setAttribute("dispatcher", createLocalDispatcher(context, layout.getTarget(), delegator));
+ context.setAttribute("authz", AuthorizationFactory.getInstance(delegator));
context.setAttribute("security", SecurityFactory.getInstance(delegator));
}