elecharny commented on PR #382:
URL: https://github.com/apache/directory-server/pull/382#issuecomment-6437854243
It's even more complex than what I thought. Results are sent to the client
when a modification is applied, through code like:
```
public void modify( final ModifyOperationContext modifyContext ) throws
LdapException
{
Entry oriEntry = modifyContext.getEntry();
// modification was already done when this flag is turned on, move
to sending the events
if ( !modifyContext.isPushToEvtInterceptor() )
{
next( modifyContext );
}
List<RegistrationEntry> selecting = getSelectingRegistrations(
modifyContext.getDn(), oriEntry );
if ( selecting.isEmpty() )
{
return;
}
// Get the modified entry
CoreSession session = modifyContext.getSession();
LookupOperationContext lookupContext = new LookupOperationContext(
session, modifyContext.getDn(),
SchemaConstants.ALL_ATTRIBUTES_ARRAY );
lookupContext.setPartition( modifyContext.getPartition() );
lookupContext.setTransaction( modifyContext.getTransaction() );
Entry alteredEntry = directoryService.getPartitionNexus().lookup(
lookupContext );
modifyContext.setAlteredEntry( alteredEntry );
for ( final RegistrationEntry registration : selecting )
{
if ( EventType.isModify(
registration.getCriteria().getEventMask() ) )
{
fire( modifyContext, EventType.MODIFY,
registration.getListener() );
}
}
}
```
As you can see, before passing into the listener (list code line) we first
fetch the entry ("get the modified entry") which do a lookup using the context.
I do think we then pass through the authorization interceptor.
To be verified... (and for all operations)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]