[Zope] Re: CoreSessionTracking

Uwe C. Schroeder Uwe.Schroeder@contrada.de
Tue, 17 Apr 2001 02:21:02 +0200


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 16 April 2001 20:47, Chris McDonough wrote:
> Hi Uwe,
>
> If possible, continue to cc the Zope list on this... thanks...

No problem.

>
> You can explicitly cause a transaction to be committed, but not in DTML=
 or
> in a Python Script.  You'll need to use an external method...
>
> Here's an example of an function which does this:
>
> def commit_trans():
>     get_transaction().commit()
>
> Make an external method named commit_trans, reference this function fro=
m
> within the external method UI, and then from dtml, you can do this:
>
> <dtml-call commit_trans>
>
> .... right before the raise.  This should save the session data, then i=
t
> won't matter if you raise afterwards in the DTML.
>

Ok, I did this - no effect. But I tried to use a normal dtml-method with =
the=20
form on it and the same session related code. That works. So it isn't a=20
general problem of my installation or the session management. It must hav=
e=20
something to do with the login manager stuff. I'll dig into login manager=
 and=20
see how things work there. I think the guess about the raise might be qui=
te=20
good. When I remove the raise from the login manager method the method wo=
n't=20
get called at all - instead the normal "basic auth" window appears. So my=
 bet=20
is that there is another raise with something like "auth required" inside=
 the=20
login manager methods. I'll check that. Probably only the placement of th=
e=20
commit is wrong.

Thanks for your help

> HTH,
>
> - C
>
> ----- Original Message -----
> From: "Uwe C. Schroeder" <Uwe.Schroeder@contrada.de>
> To: "Chris McDonough" <chrism@digicool.com>
> Sent: Monday, April 16, 2001 2:32 PM
> Subject: Re: CoreSessionTracking
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Monday 16 April 2001 20:22, you wrote:
> > Hi Uwe,
> >
> > Thanks for the concise explanation of the problem... I'm cc'ing the Z=
ope
> > list on this... it's best to keep this stuff on the Zope list because=
 the
> > message archive helps other folks out (including me! ;-)
> >
> > I think what's happening here is that the dtml-raise in the middle of=
 the
> > first snippet of DTML below aborts the ZODB transaction, and so the
>
> session
>
> > data is never saved...
> >
> > Is there a way to prompt for authorization without doing a DTML raise=
?
> > I've never used LoginManager...
>
> Hi,
>
> wow - that's a quick answer.
> No I don't think that there's another way to do handle loginmanager.
> Loginmanager gets called on an authorization exception. The LoginForm i=
sn't
> called directly, but gets called on any object a user tries to view wit=
hout
> proper authentication.
> I don't know much about ZODB transactions, but probably you know if the=
re's
> a
> way to finish the old transaction and start a new one ?
>
> Thanks - I'll try to remove the raise.
>
> Regards
>
> Uwe C. Schr=F6der
>
> - --
> Uwe C. Schr=F6der                                      ConTrada Consult=
ants
> Lindenstrasse 15                                     Tel/Fax: +49 8294
> 80070 D-86477 Adelsried                                    Mobil:   +49=
 172
> 8532352
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.4 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iD8DBQE62zrRTJbO78VG0aIRAhVvAKCq1jMYJgKai9x4qBLCKS1y8rAigACffDfG
> IqFwZQA8KO4a6d5++Qpik/o=3D
> =3DIV1E
> -----END PGP SIGNATURE-----

- --=20
	Uwe C. Schr=F6der

- --
Uwe C. Schr=F6der                                      ConTrada Consultan=
ts
Lindenstrasse 15                                     Tel/Fax: +49 8294 80=
070
D-86477 Adelsried                                    Mobil:   +49 172 853=
2352
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE624xuTJbO78VG0aIRAkffAKCcq1vvEhFDBEYGJzUtRCiwr86CKACgkd/u
Sg+6FrhZRZjT8UVUo+LN5zc=3D
=3D+pAI
-----END PGP SIGNATURE-----