Coming back to my permission question:
is there no way (no need) to determine whether a given nodetype allows adding 
subnodes?

> The nt:file nodetype (without any other
> mixin node types assigned to the node) only supports one single child
> node whose name is "jcr:content".
where/how is this declared?

> -----Original Message-----
> From: Felix Meschberger [mailto:fmesc...@gmail.com]
> Sent: Thursday, September 09, 2010 3:17 PM
> To: dev@sling.apache.org
> Subject: Re: adding a subnode to a resource/node which has a
> dot('.') in
> its name does not work
>
>
> Hi,
>
> On 09.09.2010 15:11, Clemens Wyss wrote:
> > so this use case should cause an error?
>
> Yes, that's expected, but ...
>
> >
> > AND on the server side
> >   session.checkPermission(path, "add_node"); // path being:
> "/sling-logo.png"
> > should return false, right?
>
> No. It is not a question of permission. It is a question of how the
> nt:file nodetype is defined: The nt:file nodetype (without any other
> mixin node types assigned to the node) only supports one single child
> node whose name is "jcr:content".
>
> So the actual error message is something like
> "javax.jcr.nodetype.ConstraintViolationException: No child node
> definition for 1_1284038191454 found in node /sling-logo.png"
>
> Regards
> Felix
>
> >
> > Regards
> > Clemens
> >
> >> -----Original Message-----
> >> From: Felix Meschberger [mailto:fmesc...@gmail.com]
> >> Sent: Thursday, September 09, 2010 3:02 PM
> >> To: dev@sling.apache.org
> >> Subject: Re: adding a subnode to a resource/node which has a
> >> dot('.') in
> >> its name does not work
> >>
> >>
> >> Hi,
> >>
> >> I can confirm this behaviour with the trailing "/*".
> >>
> >> If you POST to "http://localhost:8080/sling-logo.png/"; -- note the
> >> trailing slash without an astersik ! -- your actually get a failure
> >> which is expected in this case because you cannot add any
> node below a
> >> plain nt:file node as the sling-logo.png is.
> >>
> >> Would you mind posting an issue for this ? Thanks alot.
> >>
> >> Regards
> >> Felix
> >>
> >> On 09.09.2010 10:36, Clemens Wyss wrote:
> >>> before entering a bug(?) in jira, I would like to discuss
> >> this issue here.
> >>>
> >>> When I (try) add a subnode to a resource which has a dot
> >> ('.') in its name, it doesn't work AND a 200-response is
> >> sent, indicating that content without the dot and extension
> >> was modified.
> >>>
> >>> E.g. (with Sling Explorer):
> >>> select node "/sling-logo.png"
> >>> type 'juhu' into "Name hint" field
> >>> click 'new sub-node'
> >>>
> >>> --> Response:
> >>> Content modified /sling-logo
> >>> Status  200
> >>> Message         OK
> >>> Location        /sling-logo
> >>> Parent Location         /
> >>> Path    /sling-logo
> >>> Referer         http://localhost:8080/.explorer.html
> >>>
> >>> This very POST-request is sent to
> >> http://localhost:8080/sling-logo.png/*
> >>>
> >>> Feature or bug?
> >>
>

Reply via email to