You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Brian Moseley <bc...@osafoundation.org> on 2005/02/09 04:38:10 UTC
role properties not showing up as expected
i'm following the instructions at
<http://jakarta.apache.org/slide/howto-create-users.html> for creating
users and adding them to roles, but i'm running into an annoying problem.
although Domain.xml appears to be setting the group-member-set property
on my roles, i can't view the property for any role using dav explorer,
cadaver, or my custom app which uses the client lib (logging in as root
at all times).
one thing i noticed is that the page above seems to be confused about
what namespace this property should use. the screenshot which shows the
view/modify properties dialog shows the group-member-set property in the
slide namespace, but the next screenshot shows the property being set in
the DAV namespace. which is correct?
i also noticed that Domain.xml doesn't explicitly specify a namespace
for this property. does it default to the DAV namespace, or did i
discover a mistake?
one more data point: when doing a "propnames root" command in cadaver, i
can see "DAV: group-member-set" as one of the properties. but i can't
come up with an invocation of propget that will actually show me the
value of the property.
what could be going wrong here? i know other folks have written apps to
manage users and roles. i looked at the projector code, and i assume it
works, so i figure my setup's got to be flawed somehow.
here's the users and roles section of Domain.xml:
<!-- /users -->
<objectnode
classname="org.apache.slide.structure.SubjectNode" uri="/users">
<permission action="all" subject="self"
inheritable="true"/>
<permission action="all" subject="unauthenticated"
inheritable="true" negative="true"/>
<!-- /users/root represents the administrator -->
<objectnode
classname="org.apache.slide.structure.SubjectNode" uri="/users/root">
<revision>
<property
namespace="http://jakarta.apache.org/slide/"
name="password">chsrv</property>
</revision>
</objectnode>
</objectnode>
<!-- /roles -->
<objectnode
classname="org.apache.slide.structure.SubjectNode" uri="/roles">
<permission action="all" subject="self"
inheritable="true"/>
<permission action="all" subject="unauthenticated"
inheritable="true" negative="true"/>
<objectnode
classname="org.apache.slide.structure.SubjectNode" uri="/roles/root">
<revision>
<property
name="group-member-set"><![CDATA[<D:href
xmlns:D='DAV:'>/users/root</D:href>]]></property>
</revision>
</objectnode>
<objectnode
classname="org.apache.slide.structure.SubjectNode" uri="/roles/user">
<revision>
<property
name="group-member-set"><![CDATA[<D:href
xmlns:D='DAV:'>/users/root</D:href>]]></property>
</revision>
</objectnode>
</objectnode>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: role properties not showing up as expected
Posted by Brian Moseley <bc...@osafoundation.org>.
Michael Smith wrote:
> "propget resourcename" in cadaver actually issues an allprop request,
> which was originally designed to return all the properties on a
> resource. Later specs (I think this was added in the DeltaV spec?)
> realised that this was a bad idea (because some properties are expensive
> to compute), so allow some properties to not get returned by allprop.
> DAV:group-member-set is one such.
>
> So, you need to request the property specifically with cadaver. Since
> it's in a non-default namespace (i.e. not in _cadaver_'s default
> namespace, which seems to be
> http://webdav.org/cadaver/custom-properties/ ), you need to change that
> first. The following two commands should do what you want:
> set namespace "DAV:"
> propget resourcename group-member-set
thanks for the tip, that worked perfectly.
after writing more tests, i found something else interesting
(again, this is with the slide client lib):
1) when i do a propfind for /roles/ with depth 1, for each
of the child resources i get back what i assume are the
properties specified by allprop (9 of them, all DAV:).
2) when i do a propfind for /roles/root with depth 0, i get
back 10 properties - the same ones above, plus group-member-set.
i haven't figured out if this is a feature of the client api
(which is either undocumented, or assumed to be understood
by somebody more familiar with webdav than i, or that i
simply missed), or if something wacky is going on.
in any event, assuming i want my webapp to present a list of
roles, each with their member users, then i guess i'll have
to iterate through each of the resources within /roles/ and
do a depth 0 propfind. unless i can find some better way to
do it with the client api.
thanks again!
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: role properties not showing up as expected
Posted by Brian Moseley <bc...@osafoundation.org>.
Michael Smith wrote:
> It looks like a bug - group-member-set is definately defined as being in
> the DAV: namespace. I wouldn't expect it to work without defining the
> namespace correctly.
well, i can set and get the property by specifying the DAV:
namespace, with both cadaver and the client lib, so i guess
it all works as it's supposed to. it was just a bit
disconcerting to see an empty namespace in the response
content, but that's gone now :) thanks for the tips.
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: role properties not showing up as expected
Posted by Michael Smith <ms...@speedlegal.com>.
Brian Moseley wrote:
> Michael Smith wrote:
>
>>> one thing i noticed is that the page above seems to be confused about
>>> what namespace this property should use. the screenshot which shows
>>> the view/modify properties dialog shows the group-member-set property
>>> in the slide namespace, but the next screenshot shows the property
>>> being set in the DAV namespace. which is correct?
>>
>>
>>
>> It should be in the "DAV:" namespace.
>
>
> i thought so, but it doesn't look like it is. here's the property that
> i'm getting in my propfind response:
>
> <group-member-set xmlns=""></group-member-set>
>
> again, the property definition in Domain.xml (the stock one from
> slide.war in the jakarta-slide-server-bin-2.1 release) is:
>
> <revision>
> <property
> name="group-member-set"><![CDATA[<D:href x
> mlns:D='DAV:'>/users/root</D:href>]]></property>
> </revision>
>
> is that a bug? should the property definition include a namespace?
It looks like a bug - group-member-set is definately defined as being in
the DAV: namespace. I wouldn't expect it to work without defining the
namespace correctly.
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: role properties not showing up as expected
Posted by Brian Moseley <bc...@osafoundation.org>.
Michael Smith wrote:
>> one thing i noticed is that the page above seems to be confused about
>> what namespace this property should use. the screenshot which shows
>> the view/modify properties dialog shows the group-member-set property
>> in the slide namespace, but the next screenshot shows the property
>> being set in the DAV namespace. which is correct?
>
>
> It should be in the "DAV:" namespace.
i thought so, but it doesn't look like it is. here's the
property that i'm getting in my propfind response:
<group-member-set xmlns=""></group-member-set>
again, the property definition in Domain.xml (the stock one
from slide.war in the jakarta-slide-server-bin-2.1 release) is:
<revision>
<property
name="group-member-set"><![CDATA[<D:href x
mlns:D='DAV:'>/users/root</D:href>]]></property>
</revision>
is that a bug? should the property definition include a
namespace?
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: role properties not showing up as expected
Posted by Michael Smith <ms...@speedlegal.com>.
Brian Moseley wrote:
> i'm following the instructions at
> <http://jakarta.apache.org/slide/howto-create-users.html> for creating
> users and adding them to roles, but i'm running into an annoying problem.
>
> although Domain.xml appears to be setting the group-member-set property
> on my roles, i can't view the property for any role using dav explorer,
> cadaver, or my custom app which uses the client lib (logging in as root
> at all times).
I don't know my way around dav explorer, but cadaver should work fine
(but it's not always obvious how to use it!)
>
> one thing i noticed is that the page above seems to be confused about
> what namespace this property should use. the screenshot which shows the
> view/modify properties dialog shows the group-member-set property in the
> slide namespace, but the next screenshot shows the property being set in
> the DAV namespace. which is correct?
It should be in the "DAV:" namespace.
>
> i also noticed that Domain.xml doesn't explicitly specify a namespace
> for this property. does it default to the DAV namespace, or did i
> discover a mistake?
Not sure about this - assuming it does default it to the DAV: namespace,
the following should work. If it doesn't... well, then I guess you've
found a problem, and you should fix it.
>
> one more data point: when doing a "propnames root" command in cadaver, i
> can see "DAV: group-member-set" as one of the properties. but i can't
> come up with an invocation of propget that will actually show me the
> value of the property.
"propget resourcename" in cadaver actually issues an allprop request,
which was originally designed to return all the properties on a
resource. Later specs (I think this was added in the DeltaV spec?)
realised that this was a bad idea (because some properties are expensive
to compute), so allow some properties to not get returned by allprop.
DAV:group-member-set is one such.
So, you need to request the property specifically with cadaver. Since
it's in a non-default namespace (i.e. not in _cadaver_'s default
namespace, which seems to be
http://webdav.org/cadaver/custom-properties/ ), you need to change that
first. The following two commands should do what you want:
set namespace "DAV:"
propget resourcename group-member-set
I find cadaver to be pretty good generally, but it has a few quirks that
make it difficult to get used to initially...
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org