[Zope-dev] REQUEST.AUTHENTICATED_USER question

2002-01-20 Thread vio

Hi,
Does anybody know what is the method call to modify the AUTHENTICATED_USER attribute? 
I am unable to trace where REQUEST feeds data for its AUTHENTICATED_USER attribute.

Some context to my question: I am using a custom method to authenticate users coming 
to my site. So when the user logs in, he is 'Anonymous User' (from call: 
AUTHENTICATED_USER.getUserName()). But after his login name and password checked ok, 
how do I switch his identity in Zope from 'Anonymous User' to his/her new identity?  
What I am looking for is that next time I call 
'REQUEST.AUTHENTICATED_USER.getUserName()' to get the new UserName he just logged in 
as, not 'Anonymous User' again.

Examining CookieCrumbler.py source, this authentication product uses the 
'before_publishing_traverse hook' mechanism. But isn't there a simpler way to do this 
than modifying REQUEST.RESPONSE at each traversal? Sounds like a lot of overhead.

Vio

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] ExternalFile released

2002-01-20 Thread Craeg K. Strong

In case any of you hadn't seen it yet, here is the news item
I just posted on zope.org:


ExternalFile 0.8 Released (Stable)

Created by arielpartners http://www.zope.org/Members/arielpartners on 
2002/01/17.

This is the second public release of our ExternalFile 
http://www.zope.org/Members/arielpartners/ExternalFile product.
Why not simply use ExtFile 
http://www.zope.org/Members/MacGregor/ExtFile? Because ExternalFile 
supports pointing to a file in situ like a symbolic link, rather than 
copying it into some central repository directory.

This may not seem like a big deal, until you consider that those files 
might be stored in a revision control system like CVS. ExternalFile 
gives you the ability to create a Zope object that points to a file in, 
for example, a CVS sandbox for its content.

This new release adds workalike capabilities. ExternalFile can now 
behave like any of the following:

* DTMLDocument
* DTMLMethod
* Image

ExternalFile is usable by itself. It is also the base class for CVSFile, 
to be released shortly.

--Craeg





___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Core dumps - How to find out the bug?

2002-01-20 Thread Dario Lopez-Kästen

Hello!

I wonder what to do when zope coredumps?

I have been given the advice to hook up gdb to zope/python and see what
happens, but there are two problems with this:

1) I barely know gdb at all, let alone know how to hook it up to a running
process
2) The dumps happen at random (last one happened at 3 in the morning when a
co-worker was working from home).

I only have core dumps to work from. I include the stack from latest core
dump.

I am using python 2.1.2 (release), Zope2.4.3 release, RedHat Linux 7.2.
Python is compiled --without-pymalloc

What can I do more to track this down?

Thanks,

/dario

-
#0  0x0806fb77 in subtract_refs (containers=0x80b228c) at
./Modules/gcmodule.c:170
#1  0x0806ff74 in collect (young=0x80b228c, old=0x80b2298) at
./Modules/gcmodule.c:382
#2  0x080701c2 in collect_generations () at
./Modules/gcmodule.c:479
#3  0x08070255 in _PyGC_Insert (op=0x8c1dbbc) at
./Modules/gcmodule.c:508
#4  0x0807eb8e in PyMethod_New (func=0x82fa3dc, self=0x8c1d50c,
class=0x82f9f14) at Objects/classobject.c:1834
#5  0x0807c74c in instance_getattr2 (inst=0x8c1d50c,
name=0x8168e00) at Objects/classobject.c:642
#6  0x0807c67e in instance_getattr1 (inst=0x8c1d50c,
name=0x8168e00) at Objects/classobject.c:608
#7  0x0807c789 in instance_getattr (inst=0x8c1d50c,
name=0x8168e00) at Objects/classobject.c:656
#8  0x0808d291 in PyObject_GetAttr (v=0x8c1d50c,
name=0x8168e00) at Objects/object.c:1052
#9  0x0809b7ba in builtin_hasattr (self=0x0, args=0x8d8cb94) at
Python/bltinmodule.c:886
#10 0x08058df1 in call_cfunction (func=0x80c79c8, arg=0x8d8cb94,
kw=0x0) at Python/ceval.c:2850
#11 0x080577ac in eval_code2 (co=0x82d91a0, globals=0x82ebd9c,
locals=0x0, args=0x8a3a7e0, argcount=1, kws=0x0, kwcount=0,
defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:1952
#12 0x080590a3 in call_eval_code2 (func=0x82f9fb4, arg=0x8a3a7d4,
kw=0x0) at Python/ceval.c:2971
#13 0x08058ce4 in call_object (func=0x82f9fb4, arg=0x8a3a7d4,
kw=0x0) at Python/ceval.c:2810
#14 0x08058f77 in call_method (func=0x82f9fb4, arg=0x80cb8fc,
kw=0x0) at Python/ceval.c:2928
#15 0x08058cd1 in call_object (func=0x8b9f2dc, arg=0x80cb8fc,
kw=0x0) at Python/ceval.c:2808
#16 0x08058bcb in PyEval_CallObjectWithKeywords (func=0x8b9f2dc,
arg=0x80cb8fc, kw=0x0) at Python/ceval.c:2745
#17 0x0807c433 in PyInstance_New (klass=0x82f9f14, arg=0x80cb8fc,
kw=0x0) at Objects/classobject.c:489
--
- 
Dario Lopez-Kästen Systems Developer  Chalmers Univ. of Technology
[EMAIL PROTECTED]  ICQ will yield no hitsIT Systems  Services



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )