mirror of
https://github.com/apache/struts.git
synced 2026-08-31 19:35:40 +00:00
WW-4963 Implements new PrincipalAware interface
that uses withPrincipalProxy instead of setPrincipalProxy
This commit is contained in:
+6
@@ -61,6 +61,12 @@ public class PortletAwareInterceptor extends AbstractInterceptor implements Stru
|
||||
PortletRequest request = (PortletRequest) context.get(PortletConstants.REQUEST);
|
||||
((PrincipalAware) action).setPrincipalProxy(new PortletPrincipalProxy(request));
|
||||
}
|
||||
|
||||
if (action instanceof org.apache.struts2.action.PrincipalAware) {
|
||||
PortletRequest request = (PortletRequest) context.get(PortletConstants.REQUEST);
|
||||
((org.apache.struts2.action.PrincipalAware) action).withPrincipalProxy(new PortletPrincipalProxy(request));
|
||||
}
|
||||
|
||||
if (action instanceof PortletContextAware) {
|
||||
PortletContext portletContext = (PortletContext) context.get(StrutsStatics.STRUTS_PORTLET_CONTEXT);
|
||||
((PortletContextAware) action).setPortletContext(portletContext);
|
||||
|
||||
Reference in New Issue
Block a user