Hi,

I've written an implementation of the furnace authentication provider
protocol for couchdb. I decided to do a direct implementation, rather
than write a tuple db interface for couchdb, since when using couchdb
you need to jump through various hoops in order to ensure the
uniqueness of usernames and email addresses.

It's all working fine, except that the <edit-profile> controller is
not saving the modified user tuple back to the DB. I see that it sets
the changed? flag of the tuple once its submit action finishes, but
I'm having trouble working out how I should hook into whatever method
is supposed to get called in order to commit the update to the DB.

It works fine if I use the following nasty code to manually ensure
that a <user-saver> is created, and its destructor called:

    <edit-profile-action>
    [
            responder>> [
                 [
                        call( -- response )
                        logged-in-user get <user-saver> dispose
                 ] curry
            ] change-submit drop
    ]
    [ <auth-boilerplate> "edit-profile" add-responder ]
    bi

But this is pretty ugly, and I'd like to know what the Right Way is,
if there is one. Any help appreciated.

Alex

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to