jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Herman <MHer...@NBME.org>
Subject Re: Conditional access control
Date Tue, 11 Oct 2011 15:32:47 GMT

Markus Joschko wrote:
> 
> OK, if I got you right then it should look like 
> 
> Europe 
>  | |-jcr:content 
>  |      |-... 
>  |-Suisse 
>  |     |-jcr:content 
>  |-Germany 
>      |   |-jcr:content 
>      |-Bavaria 
>         |  |-jcr:content 
>         | ... 
> 
> And then the restriction might look like */jcr:content/* if I want to 
> add/remove rights from the entities. 
> 
> That is certainly workable however I have an issue with that: 
> We are using sling where the path is reflected in the URL and a path 
> like /europe/germany/jcr:content/entity1 looks quite bad. 
> And as we have three different node types the path would look even 
> worse: /europe/germany/jcr:content/entity1/jcr:content/subentity 
> 

The way I understood it Angela was referring to using the actual node type
nt:file. You'll see that the nt:file has a jcr:content property of it which
actually holds the jcr:data property. So every time you're accessing content
you are really going through a jcr:content at the very end. More like this:

Europe 
 |-Entity1a
 |     |-jcr:content
 |-Suisse 
 |     |-Entity1b
 |          |-jcr:content
 |     |-Entity2b
 |          |-jcr:content
 |-Germany 
     |   |-Entity1c
     |        |-jcr:content
     |-Bavaria 
        | ... 

Since you're using Sling, it should be fairly easy either create a
resourceType or modify the default handlers to assume that consistent
subnode and it doesn't have to appear in the URL. That is pretty much what
sling already does with nt:file, going to /path/to/filename will actually
get you /path/to/filename/jcr:content/jcr:data automatically.  You can
choose to use nt:file or do the same thing on your own node type pretty
easily.




--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Conditional-access-control-tp3891814p3894832.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Mime
View raw message