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 Tom Keeney <to...@novuscg.com> on 2002/05/30 00:59:16 UTC
Update user password
Hi All,
I'm building a client application that adds and updates users in Slide. So far, I've been able to add a user and update the "password" property in the JDBCDescriptorStore. When I add a user, the WebDAV client "propgetall" shows that the user properties are correctly set. However, when I update the user "password", the new property value shows up in the database, but a WebDAV "propgetall" does not return the new "password". How do I update the "password" so that it is updated from a WebDAV client?
Here's the code I use to add a user. This code works fine:
// create object
ObjectNode node = new slideroles.basic.UserRoleImpl(uri);
// create object's properties
NodeRevisionDescriptor revision = new NodeRevisionDescriptor(0);
NodeProperty property = new NodeProperty("resourcetype", "<collection/>", true);
revision.setProperty(property);
Date date = new Date();
revision.setCreationDate(date);
revision.setLastModified(date);
property = new NodeProperty("getcontentlength", "0", true);
revision.setProperty(property);
property = new NodeProperty("source", "", true);
revision.setProperty(property);
property = new NodeProperty("password", password, NodeProperty.SLIDE_NAMESPACE);
revision.setProperty(property);
// store object
structure.create(st, node, uri);
content.create(st, uri, revision, null);
Here's code that updates the user "password" in the database but does not update the WebDAV property:
<snippet>
// create object's properties
NodeRevisionDescriptor revision = new NodeRevisionDescriptor(0);
NodeProperty property = new NodeProperty("password", password, NodeProperty.SLIDE_NAMESPACE);
revision.setProperty(property);
content.create(st, uri, revision, null);
</snippet>
Any help with the above <snippet> is appreciated!
Thanks,
Tom Keeney
Novus Consulting Group
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>