portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Watler <wat...@wispertel.net>
Subject Re: Question about FolderPermission
Date Thu, 19 Jan 2006 06:39:03 GMT
David,

This class in patterned off of the standard Java FilePermission 
implementation:

http://java.sun.com/j2se/1.4.2/docs/api/java/io/FilePermission.html

I find the description here ambiguous as well. However, if you look
through the J2SE code, it does appear that your assertion is true: A 
does seem
to imply B.

Randy

David Jencks wrote:
> I'm not sure I understand how FolderPermission works yet, but I 
> wonder....
>
> FolderPermission A = new FolderPermission("/-", "view");
> FolderPermission B = new FolderPermission("/", "view");
>
> should A.implies(B)?
>
> I would expect so, but currently it doesn't.
>
> If it should, I can see two ways to make it happen:
>
> 1. make B.folder == true.
> 2. make the condition when A is a recursive folder and B is not a folder
>
> ((that.cpath.length() >= this.cpath.length()) && 
> that.cpath.startsWith(this.cpath));
>
> (i.e. length allowed to be equal).
>
> Am I missing something?  Is one of these better than the other?
>
> thanks
> david jencks
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message