taylor 2004/08/12 10:37:44
Modified: fusion/src/java/org/apache/jetspeed/fusion/engine/servlet
FusionServletRequestImpl.java
Log:
just pass on to default impl instead of repeating
CVS: ----------------------------------------------------------------------
CVS: PR:
CVS: If this change addresses a PR in the problem report tracking
CVS: database, then enter the PR number(s) here.
CVS: Obtained from:
CVS: If this change has been taken from another system, such as NCSA,
CVS: then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS: If this code has been contributed to Apache by someone else; i.e.,
CVS: they sent us a patch or a new module, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.
Revision Changes Path
1.2 +3 -50
jakarta-jetspeed/fusion/src/java/org/apache/jetspeed/fusion/engine/servlet/FusionServletRequestImpl.java
Index: FusionServletRequestImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/fusion/src/java/org/apache/jetspeed/fusion/engine/servlet/FusionServletRequestImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FusionServletRequestImpl.java 12 Aug 2004 12:52:35 -0000 1.1
+++ FusionServletRequestImpl.java 12 Aug 2004 17:37:44 -0000 1.2
@@ -15,23 +15,17 @@
*/
package org.apache.jetspeed.fusion.engine.servlet;
-import java.util.Iterator;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.jetspeed.engine.servlet.ServletRequestImpl;
import org.apache.jetspeed.services.JetspeedSecurity;
import org.apache.jetspeed.services.security.JetspeedSecurityException;
-import org.apache.pluto.om.common.SecurityRole;
-import org.apache.pluto.om.common.SecurityRoleRef;
-import org.apache.pluto.om.common.SecurityRoleRefSet;
-import org.apache.pluto.om.common.SecurityRoleSet;
-import org.apache.pluto.om.portlet.PortletDefinition;
import org.apache.pluto.om.window.PortletWindow;
/**
* @author <a href="mailto:[EMAIL PROTECTED]">Jeremy Ford</a>
* @version $Id$
+ * @author <a href="mailto:[EMAIL PROTECTED]">Jeremy Ford</a>
*/
public class FusionServletRequestImpl extends ServletRequestImpl
{
@@ -64,48 +58,7 @@
{
log.error("Failed to find role " + roleName);
}
-
- if(!result)
- {
- PortletDefinition portletDefinition =
portletWindow.getPortletEntity().getPortletDefinition();
- SecurityRoleRefSet roleRefSet =
portletDefinition.getInitSecurityRoleRefSet();
- SecurityRoleSet roleSet =
portletDefinition.getPortletApplicationDefinition().getWebApplicationDefinition()
- .getSecurityRoles();
-
- Iterator roleRefIter = roleRefSet.iterator();
- while (roleRefIter.hasNext())
- {
- SecurityRoleRef roleRef = (SecurityRoleRef) roleRefIter.next();
-
- //find the matching security-role element based on role-name
- if (roleName.equals(roleRef.getRoleName()))
- {
- String roleLinkName = roleRef.getRoleLink();
-
- //if the role-link doesn't exist, use the role-name
- if (roleLinkName == null || roleLinkName.length() == 0)
- {
- roleLinkName = roleName;
- }
-
- //what does this gain???
- Iterator roleIter = roleSet.iterator();
- while (roleIter.hasNext())
- {
- SecurityRole role = (SecurityRole) roleIter.next();
- if (roleLinkName.equals(role.getRoleName()))
- {
- //fall back to J2's impl
- //it will repeat this same code and then defer
- //to HttpRequestWrapper. The impl for this just
checks
- //the realm mapping
- return super.isUserInRole(roleLinkName);
- }
- }
- }
- }
- }
-
+
if(!result)
{
result = super.isUserInRole(roleName);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]