Re: Moving to Oak 1.50 or newer

2023-06-01 Thread Jorge Flórez
great, thanks! El jue, 1 jun 2023 a las 14:19, Angela Schreiber () escribió: > hi jorge > > i believe you can even have a tiny simplification. instead of > > if (policy instanceof JackrabbitAccessControlPolicy && policy instanceof > AccessControlList) > > you could write: > > if (policy

Re: Moving to Oak 1.50 or newer

2023-06-01 Thread Angela Schreiber
hi jorge i believe you can even have a tiny simplification. instead of if (policy instanceof JackrabbitAccessControlPolicy && policy instanceof AccessControlList) you could write: if (policy instanceof JackrabbitAccessControlList) because interface JackrabbitAccessControlList extends

Re: Moving to Oak 1.50 or newer

2023-06-01 Thread Jorge Flórez
Hi Angela. Thank you. I don't mind being extra careful :) , especially in this matter. I think I just made all the changes, it seems it is working. This is the code I used to test getting the entries, in case anyone needs it (or sees an error). JackrabbitSession jcrSession = (JackrabbitSession)

Re: Moving to Oak 1.50 or newer

2023-06-01 Thread Angela Schreiber
Hi Jorge I would recommend sticking with JCR/Jackrabbit API again, but I admit that I am probably extra careful: * test if the AccessControlPolicy is an instanceof AccessControlList * get the list of AccessControlEntries * test if an AccessControlEntry is a

Re: Moving to Oak 1.50 or newer

2023-06-01 Thread Jorge Flórez
Hi Angela, thank you for the suggestion. I passed from if(policy instanceof ImmutableACL) to if(policy instanceof JackrabbitAccessControlPolicy) I was a bit hesitant because the debugger was showing ImmutableAcl for those elements, but it works :) Thank you. I have a question, I have some

Re: Moving to Oak 1.50 or newer

2023-06-01 Thread Angela Schreiber
Hi Jorge Yes, that has changed with OAK-10135 for consistency reasons. Instead of casting to a spi class (ImmutableAcl) or checking for that one, I would suggest you verify that the given effective policy is a JackrabbitAccessControlPolicy.