if ( dn.equals( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) ) { String msg = "User " + principalDn; msg += " does not have permission to modify the account of the"; msg += " admin user."; throw new LdapNoPermissionException( msg ); }
    private void protectModifyAlterations( Name dn ) throws LdapNoPermissionException    {        Name principalDn = getPrincipal().getJndiName();        if ( dn.toString().equals( "" ) )        {            String msg = "The rootDSE cannot be modified!";            throw new LdapNoPermissionException( msg );        }        if ( !principalDn.equals( ADMIN_DN ) )        {            if ( dn.size() > 2 && dn.startsWith( USER_BASE_DN ) )            {                String msg = "User " + principalDn;                msg += " does not have permission to modify the account of the";                msg += " user " + dn + ".\nEven the owner of an account cannot";                msg += " modify it.\nUser accounts can only be modified by the";                msg += " administrator.";                throw new LdapNoPermissionException( msg );            }            if ( dn.size() > 2 && dn.startsWith( GROUP_BASE_DN ) )            {                String msg = "User " + principalDn;                msg += " does not have permission to modify the group entry ";                msg += dn + ".\nGroups can only be modified by the admin.";                throw new LdapNoPermissionException( msg );            }        }    }