jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Reschke <julian.resc...@gmx.de>
Subject Re: public review of 283 - checkPermission
Date Thu, 26 Jul 2007 14:35:30 GMT
Thomas Mueller wrote:
> Hi,
> 
> I would keep Session.checkPermission(..). It find it useful. See also
> java.lang.SecurityManager.
> 
> But exceptions shouldn't be used for flow control, so I would add:
> boolean Session.isPermissable(..) or
> boolean Session.hasAccess(..) or
> boolean Session.getPermission(..)
> 
> The 'action' parameter is a comma separated list of action strings:
> "add_node, set_property, remove, read". To avoid typos the predefined
> actions should be constants. Bit masks could be used, int
> Session.PERMISSION_ADD_NODE = 1, PERMISSION_SET_PROPERTY = 2, 4, 8.

Well, *if* we make changes here then I'd suggest to get rid of the 
comma-based format as well. Just make it a Set of collection names, or 
something like that.

Best regards, Julian

Mime
View raw message