incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Jaquith <ajaqu...@yankeegroup.com>
Subject WikiSpaces follow-up
Date Mon, 04 Feb 2008 21:15:09 GMT
Janne,

I took a quick look at the WikiSpaces note on the JSPWiki3Design page.  
Good stuff. Some comments:

"URLs should be in the form $baseURL/Wiki.jsp?page=<space>:<page>/ 
<subpage>.

"For example: System:SystemInfo/attachment.jpg. Or, Main:Information/ 
MoreInfo/ArbitraryPage."

That sounds good, but I'd like to see if we can make it mesh with the  
modifications we'd need to make to the various Permission classes.  
They should ideally match, syntax-wise.

For example, here's today's syntax for PagePermission:

   PagePermission "target", "action", where:
     target=<wiki>:<page>
     action=read|edit|delete|rename etc.

For WikiPermission, it's like this:

   WikiPermission "target", "action", where:
     target=<wiki>
     action=createPages|createGroups etc.

For GroupPermission:

   GroupPermission "target", "action", where:
     target=<wiki>:<group>
     action=view|edit|delete

Today, <wiki> means the value returned by  
WikiEngine.getApplicationName().

One easy way to make things match up is would be to declare the "wiki"  
permission parameter to be equivalent to what we'd call a "space" in  
JSPWiki 3.

However, I think this might be a little problematic... because to  
date, the "wiki" parameter was meant to distinguish between multiple  
webapps, rather than distinguish between parts of a single webapp.  
This is important for global security policies, for example.

My proposal would be to use the following convention:

For page URLs: <wiki>:<space>:<page>/<subpage>
For page permission targets: <wiki>:<space>:<page>/<subpage>

...where, for permission purposes, not supplying the <space> parameter  
would imply the default space, and not supplying the <wiki> parameter  
would imply all wikis (as it does today). So, you'd have:

     PagePermission "MyWiki:Main:Information/MoreInfo", "read"

Would you see GroupPermissions or WikiPermissions needing support for  
spaces? I don't think GroupPermission would need them, because there's  
no need to divide up the groups for a given wiki. WikiPermission might  
need spaces, though (e.g., for createPages).

Also, I have a question. Would subpages recurse? Or would there just  
be one subpage level underneath the page?

Andrew
                                                                                         
                                                                        



Mime
View raw message