You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Emmanuel Lecharny <el...@gmail.com> on 2010/12/27 17:57:16 UTC

Pb while reverting subentry operations

Hi,

as I'm adding some tests for the AP and subentry operations, I'm having 
some issues with the revert operation.

For instance, adding a new subentry implies the AP seqNumber will be 
incremented. When we revert the addition, we have to decrement the 
SeqNumber, but as it's an OperationalAttribute with a NoUserModification 
AT set to true, this modification fails.

I was able to workaround the problem in the code by bypassing the 
interceptors, as I was dealing with this AT from the server itself, but 
the revert is done from outside of the server.

How can we solve this issue ?
- Add a specific check for this AT, and allow a modification done when 
it's done by an admin user during a revert operation ?
- Simply let an Admin user to modify the AT ?
- Ditch the NoUserModification from this AT, but allow it to be modified 
by an admin only, in the code ?
- Simply remove the NoUserModification in the SeqNumber AT ?

Right now, my favorite is #3, but I will currently implement #4 atm.

wdyt ?

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: Pb while reverting subentry operations

Posted by Stefan Seelmann <ma...@stefan-seelmann.de>.
Another idea: use a special control which bypasses the interceptors

Kind Regards,
Stefan

On Dec 27, 2010 5:57 PM, "Emmanuel Lecharny" <el...@gmail.com> wrote:
> Hi,
>
> as I'm adding some tests for the AP and subentry operations, I'm having
> some issues with the revert operation.
>
> For instance, adding a new subentry implies the AP seqNumber will be
> incremented. When we revert the addition, we have to decrement the
> SeqNumber, but as it's an OperationalAttribute with a NoUserModification
> AT set to true, this modification fails.
>
> I was able to workaround the problem in the code by bypassing the
> interceptors, as I was dealing with this AT from the server itself, but
> the revert is done from outside of the server.
>
> How can we solve this issue ?
> - Add a specific check for this AT, and allow a modification done when
> it's done by an admin user during a revert operation ?
> - Simply let an Admin user to modify the AT ?
> - Ditch the NoUserModification from this AT, but allow it to be modified
> by an admin only, in the code ?
> - Simply remove the NoUserModification in the SeqNumber AT ?
>
> Right now, my favorite is #3, but I will currently implement #4 atm.
>
> wdyt ?
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>

Re: Pb while reverting subentry operations

Posted by Emmanuel Lecharny <el...@gmail.com>.
On 12/27/10 6:57 PM, Kiran Ayyagari wrote:
> On Mon, Dec 27, 2010 at 10:27 PM, Emmanuel Lecharny<el...@gmail.com>  wrote:
>> Hi,
>>
>> as I'm adding some tests for the AP and subentry operations, I'm having some
>> issues with the revert operation.
>>
>> For instance, adding a new subentry implies the AP seqNumber will be
>> incremented. When we revert the addition, we have to decrement the
>> SeqNumber, but as it's an OperationalAttribute with a NoUserModification AT
>> set to true, this modification fails.
>>
>> I was able to workaround the problem in the code by bypassing the
>> interceptors, as I was dealing with this AT from the server itself, but the
>> revert is done from outside of the server.
>>
>> How can we solve this issue ?
>> - Add a specific check for this AT, and allow a modification done when it's
>> done by an admin user during a revert operation ?
> this is the preferred way to go, similar type of checks are added for
> some unmodified
> ATs like entryUUID, all these are present in the SchemaInterceptor
The difference being that once created, the entryUUID will *never* 
change. The seqNumber will be modified every time we will update some 
subentry.

The modifyTimestamp though can be modified (I don't know if it's a 
REPLACE or a delete/add operation), and has a no-user-modification field 
set to true. I have to check how this is handled...

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: Pb while reverting subentry operations

Posted by Kiran Ayyagari <ka...@apache.org>.
On Mon, Dec 27, 2010 at 10:27 PM, Emmanuel Lecharny <el...@gmail.com> wrote:
> Hi,
>
> as I'm adding some tests for the AP and subentry operations, I'm having some
> issues with the revert operation.
>
> For instance, adding a new subentry implies the AP seqNumber will be
> incremented. When we revert the addition, we have to decrement the
> SeqNumber, but as it's an OperationalAttribute with a NoUserModification AT
> set to true, this modification fails.
>
> I was able to workaround the problem in the code by bypassing the
> interceptors, as I was dealing with this AT from the server itself, but the
> revert is done from outside of the server.
>
> How can we solve this issue ?
> - Add a specific check for this AT, and allow a modification done when it's
> done by an admin user during a revert operation ?
this is the preferred way to go, similar type of checks are added for
some unmodified
ATs like entryUUID, all these are present in the SchemaInterceptor
> - Simply let an Admin user to modify the AT ?
> - Ditch the NoUserModification from this AT, but allow it to be modified by
> an admin only, in the code ?
> - Simply remove the NoUserModification in the SeqNumber AT ?
>
> Right now, my favorite is #3, but I will currently implement #4 atm.
>
> wdyt ?
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>



-- 
Kiran Ayyagari