jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@adobe.com>
Subject Re: Perhaps a bug in Session.checkPermission oder Session.hasPermission?
Date Wed, 03 Nov 2010 21:45:32 GMT
On 02.11.10 15:22, "Cech. Ulrich" <Ulrich.Cech@aeb.de<mailto:Ulrich.Cech@aeb.de>>


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.


Alexander Klimetschek

View raw message