jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller" <thomas.tom.muel...@gmail.com>
Subject Re: public review of 283 - checkPermission
Date Thu, 26 Jul 2007 20:26:55 GMT
Hi,

I saw "boolean AccessControlManager.hasPrivilege(String absPath,
String[] privileges)", but I thought it's something different so
far...

String[] privileges: "an array of Privileges" (should it say "an array
of privilege names"?).

interface Privilege: "Each privilege is identified by a NAME that is
unique across the set of privileges supported by a repository. JCR
defines a set of standard privileges in the jcr  namespace".

I was a bit confused, those privilege names are not the same as the
'action strings' defined in Session.checkPermission(..). I found a
mapping between 'action strings' and 'privilege names' on page 383 in
the spec. Is this mapping required, why not just one one or the other?
Should they be documented in the Javadocs of the Privilege interface
as well? What about adding constants in the Privilege interface?

AccessControlManager.hasPrivilege uses an array of privileges, while
Session.checkPermission(..) uses a string of comma separated 'action
strings'. This is not consistent; is there a reason for that?

Thomas

Mime
View raw message