/** * TODO - perhaps we should just use a flag that is calculated on creation * of this session * * @see org.apache.directory.server.core.api.CoreSession#isAdministrator() */ @Override public boolean isAdministrator() { String normName = getEffectivePrincipal().getName(); return normName.equals( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED ); }
writer.write( principal.getName() ); writer.write( '\n' );
String adminDn = session.getEffectivePrincipal().getName();
String modifiersName = opContext.getSession().getEffectivePrincipal().getName(); String modifyTimestamp = DateUtils.getGeneralizedTime();
/** * {@inheritDoc} */ @Override public void rename( RenameOperationContext renameContext ) throws LdapException { Entry entry = ( ( ClonedServerEntry ) renameContext.getEntry() ).getClonedEntry(); entry.put( SchemaConstants.MODIFIERS_NAME_AT, getPrincipal( renameContext ).getName() ); entry.put( SchemaConstants.MODIFY_TIMESTAMP_AT, DateUtils.getGeneralizedTime() ); Entry modifiedEntry = renameContext.getOriginalEntry().clone(); modifiedEntry.put( SchemaConstants.MODIFIERS_NAME_AT, getPrincipal( renameContext ).getName() ); modifiedEntry.put( SchemaConstants.MODIFY_TIMESTAMP_AT, DateUtils.getGeneralizedTime() ); Attribute csnAt = new DefaultAttribute( directoryService.getAtProvider().getEntryCSN(), directoryService .getCSN().toString() ); modifiedEntry.put( csnAt ); renameContext.setModifiedEntry( modifiedEntry ); next( renameContext ); }
String adminDn = session.getEffectivePrincipal().getName();
+ requestor.getCoreSession().getEffectivePrincipal().getName() );
/** * {@inheritDoc} */ @Override public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException { Entry modifiedEntry = moveAndRenameContext.getModifiedEntry(); modifiedEntry.put( SchemaConstants.MODIFIERS_NAME_AT, getPrincipal( moveAndRenameContext ).getName() ); modifiedEntry.put( SchemaConstants.MODIFY_TIMESTAMP_AT, DateUtils.getGeneralizedTime() ); modifiedEntry.setDn( moveAndRenameContext.getNewDn() ); Attribute csnAt = new DefaultAttribute( directoryService.getAtProvider().getEntryCSN(), directoryService .getCSN().toString() ); modifiedEntry.put( csnAt ); moveAndRenameContext.setModifiedEntry( modifiedEntry ); next( moveAndRenameContext ); }
/** * {@inheritDoc} */ @Override public void move( MoveOperationContext moveContext ) throws LdapException { Entry modifiedEntry = moveContext.getOriginalEntry().clone(); modifiedEntry.put( SchemaConstants.MODIFIERS_NAME_AT, getPrincipal( moveContext ).getName() ); modifiedEntry.put( SchemaConstants.MODIFY_TIMESTAMP_AT, DateUtils.getGeneralizedTime() ); Attribute csnAt = new DefaultAttribute( directoryService.getAtProvider().getEntryCSN(), directoryService .getCSN().toString() ); modifiedEntry.put( csnAt ); modifiedEntry.setDn( moveContext.getNewDn() ); moveContext.setModifiedEntry( modifiedEntry ); next( moveContext ); }
getPrincipal( modifyContext ).getName() );
public void add( AddOperationContext addContext ) throws LdapException String principal = getPrincipal( addContext ).getName();