You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Cech. Ulrich" <Ul...@aeb.de> on 2010/11/02 15:22:37 UTC
Perhaps a bug in Session.checkPermission oder Session.hasPermission?
Hello,
ich found an unexpected behavior of the methods Session.checkPermission() and Session.hasPermission().
CheckPermission throws an AccessControlException although the correct permission is set. Session.hasPermission() results in a 'correct' return value with "true".
I attached an JUnit-Test (with a repository.xml), perhaps someone can verify this as a bug ... or do I perhaps something wrong?
Thanks in advance,
Ulrich
Re: Perhaps a bug in Session.checkPermission oder
Session.hasPermission?
Posted by Alexander Klimetschek <ak...@adobe.com>.
On 02.11.10 15:22, "Cech. Ulrich" <Ul...@aeb.de>> wrote:
Hello,
ich found an unexpected behavior of the methods Session.checkPermission() and Session.hasPermission().
CheckPermission throws an AccessControlException although the correct permission is set. Session.hasPermission() results in a ‘correct’ return value with “true”.
I attached an JUnit-Test (with a repository.xml), perhaps someone can verify this as a bug … or do I perhaps something wrong?
>From just looking at the code of the unit test: the result of the hasPermission() calls are not checked – do they all actually return "true"? Secondly, the checkPermission() tests have a fail() when they _do not_ throw an AccessControlException. AFAIU it should be considered wrong if the exception is thrown, since the user should have all read/write rights.
Regards,
Alex
--
Alexander Klimetschek
aklimets@adobe.com