tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r325874 - in /tomcat/container/tc5.5.x: catalina/src/share/org/apache/catalina/connector/Request.java catalina/src/share/org/apache/catalina/realm/RealmBase.java webapps/docs/changelog.xml
Date Mon, 17 Oct 2005 10:39:26 GMT
Author: remm
Date: Mon Oct 17 03:39:15 2005
New Revision: 325874

URL: http://svn.apache.org/viewcvs?rev=325874&view=rev
Log:
- 37044: RealmBase.hasResourcePermission needs access to the GenericPrincipal
  as the JAAS realm no longer overrides hasRole.

Modified:
    tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Request.java
    tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java
    tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Request.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Request.java?rev=325874&r1=325873&r2=325874&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Request.java
(original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Request.java
Mon Oct 17 03:39:15 2005
@@ -2133,6 +2133,14 @@
     /**
      * Return the principal that has been authenticated for this Request.
      */
+    public Principal getPrincipal() {
+        return (userPrincipal);
+    }
+
+
+    /**
+     * Return the principal that has been authenticated for this Request.
+     */
     public Principal getUserPrincipal() {
         if (userPrincipal instanceof GenericPrincipal) {
             return ((GenericPrincipal) userPrincipal).getUserPrincipal();

Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java?rev=325874&r1=325873&r2=325874&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java (original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java Mon
Oct 17 03:39:15 2005
@@ -723,7 +723,7 @@
         }
 
         // Which user principal have we already authenticated?
-        Principal principal = request.getUserPrincipal();
+        Principal principal = request.getPrincipal();
         for(int i=0; i < constraints.length; i++) {
             SecurityConstraint constraint = constraints[i];
             String roles[] = constraint.findAuthRoles();

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=325874&r1=325873&r2=325874&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Mon Oct 17 03:39:15 2005
@@ -52,6 +52,11 @@
         <bug>34724</bug>: Ability to set domain for Single-Sign-On cookie.  Patch
by Oliver
         Rossmueller. (yoavs)
       </add>
+      <fix>
+        <bug>37044</bug>: RealmBase.hasResourcePermission needs to access the
GenericPrincipal as
+        set by the realm unless hasRole is overriden, which was no longer being done properly
for
+        the JAAS realm (remm)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message