Questions regarding object CanEditObject and clearing up a bit of confusion

Questions regarding object CanEditObject and clearing up a bit of confusion

Old forum URL: forums.lhotka.net/forums/t/7323.aspx


dhr posted on Wednesday, July 22, 2009

Hi there, I've been using csla.net for sometime now, I really enjoy using it..

In my most recent project, I've been required to build a user forum, which is is working.. sort of..

I'm been struggling with a few things.  When using the forum, the user first selects a subject, which is a read only list of read only objects, this page directs them to a topics page for that subject, and displays a another list of ready only objects, one for each topic..  The user at that time can create a new topic..

My issue comes when i view the posts for a topic.   I've been looking for a way to display each post, but if the post was created by the user who is currently logged in, then this post would be editable..

I would like the user to be able to edit their post directly on the page, without having to go to a another page to do the editing.

Just to get started, I have an editable root list object, which contains editable child objects, a child for each post, however, because CanEditObject would be for the list, any user who can the list object could also edit any child.

I'm wondering if I am even able to do this, or if my UI would have to handle this, checking if the post was created by the current user, and allowing them to edit.

If anyone has any suggestions of an object design for something like this, it would be appreciated.

My end goal would to end up with something pretty close to this forum..

Thanks very much...
 

Copyright (c) Marimer LLC