|
|
Author: elecharny
Date: Sun Nov 30 15:17:50 2008
New Revision: 721927
URL: http://svn.apache.org/viewvc?rev=721927&view=rev
Log:
Populating the Context with the entry may not work if the current context does
not permit to do a lookup, due to restricted ACI : we now use the adminSession
to get back the entry
Modified:
directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
Modified:
directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
URL:
http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java?rev=721927&r1=721926&r2=721927&view=diff
==============================================================================
---
directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
(original)
+++
directory/apacheds/branches/apacheds-mina2/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
Sun Nov 30 15:17:50 2008
@@ -26,6 +26,7 @@
import java.util.Map;
import java.util.Set;
+import org.apache.directory.server.core.CoreSession;
import org.apache.directory.server.core.DirectoryService;
import org.apache.directory.server.core.entry.ClonedServerEntry;
import org.apache.directory.server.core.filtering.EntryFilteringCursor;
@@ -707,7 +708,10 @@
{
try
{
- opContext.setEntry( opContext.getSession().lookup(
opContext.getDn(), SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES_ARRAY ) );
+ // We have to use the admin session here, otherwise we may have
+ // trouble reading the entry due to insufficient access rights
+ CoreSession adminSession =
opContext.getSession().getDirectoryService().getAdminSession();
+ opContext.setEntry( adminSession.lookup( opContext.getDn(),
SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES_ARRAY ) );
}
catch ( Exception e )
{
|
|