sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r939660 - /sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
Date Fri, 30 Apr 2010 13:20:26 GMT
Author: cziegeler
Date: Fri Apr 30 13:20:26 2010
New Revision: 939660

URL: http://svn.apache.org/viewvc?rev=939660&view=rev
Log:
Don't sudo if sudo user is the same as the session user.

Modified:
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java

Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java?rev=939660&r1=939659&r2=939660&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
Fri Apr 30 13:20:26 2010
@@ -584,7 +584,7 @@ public class JcrResourceResolverFactoryI
     private Session handleSudo(final Session session, final Map<String, Object> authenticationInfo)
     throws LoginException {
         final String sudoUser = getSudoUser(authenticationInfo);
-        if ( sudoUser != null ) {
+        if ( sudoUser != null && !session.getUserID().equals(sudoUser) ) {
             try {
                 final SimpleCredentials creds = new SimpleCredentials(sudoUser, new char[0]);
                 return session.impersonate(creds);



Mime
View raw message