[Bese-devel] require a login

Jan Rychter jan at rychter.com
Fri Oct 28 15:19:21 UTC 2005


Marco wrote:
> Jan Rychter <jan at rychter.com> writes:
> > Simple question: how do you require a login into your application?
> >
> > The wiki example isn't quite enough for me -- the "UCW way" example
> > requires login in an action, while I require one before showing the main
> > component, e.g. in the entry point. I quickly run into issues there: you
> > need a window component if it's to be called from an entry point, and
> > there is no way to answer (go back to an entry point).
> 
> there should be. this:
> 
> (defentry-point "index.ucw" (:application *idi-backoffice*) ()
>   (call 'backoffice-login)
>   (call 'backoffice))
> 
> is what i'm currently using for one of my apps (though that app is
> running with a few week old copy of ucw so maybe i've broken something
> in the meantime).
> 
> obviously backoffice-login is a window component and when the auth
> credentials are good it answer (but not before).

Hmm. I was getting this problem when answering:

The slot IT.BESE.UCW::CALLING-COMPONENT is unbound in the object
#<MM::SERVER-LOGIN-FORM {9DD7F49}>.

Ah, can now I see why. The problem was that I first needed a login form,
so I created an object subclassing form-element. But to call it from an
entry point, I needed it to be a window-component. I also wanted it to
be TAL-templateable. Subclassing both form-element and window-component
wouldn't work, so I made a window-component which contains the form. But
then the form object can't answer, because it is not the one being
called.

I'm documenting this mostly so that you can see where newbies can get
stuck.

--J.



More information about the bese-devel mailing list