On Fri, Apr 20, 2001 at 02:02:01PM -0700, Andy McKay wrote:
Introducing a new concept on advanced garbage treatment process, and
licensing patents
For details, please reference the web site:
The patent is flawed obviously since it doesn't garbage collect itself...
Shows you how we
Hello,
After rereading the ZopeSecurityPolicy source code, I tried the
following hack.
I add in the skinscript :
WITH 1 COMPUTE __allow_access_to_unprotected_subobjects__=RESULT
which does work : it fools the security mechanism.
I can live with it but feel that there is only a slight
Chris McDonough wrote:
In the meantime, if you're desperate, here's a temporary fix...
replace the items method of the UnTextIndex class in UnTextIndex.py. The
current method looks something like this:
def items(self):
reurn self._index.items()
change it to:
def items(self):
d'oh!
Error type: strongTypeError/strongbr
Error value: strongunsubscriptable object/strong
Traceback (innermost last):
File E:\Zope\2379A4~1.1\lib\python\ZPublisher\Publish.py, line 223, in
publish_module
File E:\Zope\2379A4~1.1\lib\python\ZPublisher\Publish.py, line 187, in
Is onStart and onEnd broken in the CoreSessionTracking (0.8) product? (Or am
I broken? :-))
I have a folder /Radio
Within that folder I have a Session ID Manager and a Session Data
Manager named Session.
Session onStart method path of the Session ID Manager is set to
/Radio/onStart
I have an
Is onStart and onEnd broken in the CoreSessionTracking (0.8) product? (Or
am
I broken? :-))
I hope neither ;-)
I have a folder /Radio
Within that folder I have a Session ID Manager and a Session Data
Manager named Session.
Session onStart method path of the Session ID Manager is set to
Can you give me something that reproduces this?
- Original Message -
From: Chris Withers [EMAIL PROTECTED]
To: Chris McDonough [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, April 23, 2001 8:32 AM
Subject: Re: [Zope-dev] ZCatalog wgh!: The Error
d'oh!
Error type:
The onStart method will be called when a session data object
is created.
Neither of the calls you show here create a session data
object. Something
like Session.getSessionData() would, however.
Ah.
I read when a session starts, you may call an external method or
PythonScrip and thought
Sorry, I meant UnIndex.py! Doh!
There is a more comprehensive fix checked in to 2.3.2b2.
In the meantime, if you're desperate, here's a temporary fix...
replace the items method of the UnTextIndex class in UnTextIndex.py.
The
current method looks something like this:
def
This onStart method...
sdo['date'] = context.ZopeTime()
...gives this error:
--
2001-04-23T14:36:32 PROBLEM(100) Session Tracking session event failed
The call to function onStart failed. Traceback:
Traceback (innermost last):
File
Darn. Security nails us once again. :-(
I'll need to figure out how to allow __setitem__ to be called on session
data objects from within a Python Script.
In the meantime, use the .set method of the session data object, e.g. in the
onStart function:
sdo.set('Username', 'Foobar')
.. or use
In the meantime, use the .set method of the session data
object, e.g. in the
onStart function:
sdo.set('Username', 'Foobar')
.. or use an external method.
Ok, works now. Thanks.
How to I access things like the DTML AUTHENTICATED_USER.getUserName() from a
python script?
/Magnus
Alternately (and this will be in the next CST release), add this to the
session data object class (SessionData.SessionData):
__guarded_setitem__ = __setitem__
As far as finding the currently logged in user's name, try this:
context.REQUEST['AUTHENTICATED_USER'].getUserName()
This is a
Chris McDonough wrote:
Darn. Security nails us once again. :-(
I'll need to figure out how to allow __setitem__ to be called on session
data objects from within a Python Script.
Add a line below your definition of __setitem__ that reads:
__guarded_setitem__ = __setitem__
cheers,
Title: RE: [Zope-dev] CoreSessionTracking
Do you mean:
from AccessControl import getSecurityManager
security = getSecurityManager()
user = security.getUser()
userName = user.getUserName()
???
Adrian...
-Original Message-
From: Chris Withers [mailto:[EMAIL PROTECTED]]
Sent:
RE: [Zope-dev] CoreSessionTrackingThat's it! Except from DTML. ;-)
- Original Message -
From: Adrian Hungate
To: 'Chris Withers' ; Chris McDonough
Cc: Magnus Heino (Rivermen) ; [EMAIL PROTECTED]
Sent: Monday, April 23, 2001 12:00 PM
Subject: RE: [Zope-dev] CoreSessionTracking
Do you
Found this in the constructor for the File Product and I don't understand
why it is more efficient. (I want to subclass a File, so this does have
some purpose ;-)) Anybody got any ideas?
# First, we create the file without data:
self._setObject(id, File(id,title,'',content_type,
_.SecurityGetUser()
-Randy
___
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
Hi!
So here's more :)
def _objectAdding(self,client,
_tmap={ None:AddedStatus,
DeletedStatus:ChangedStatus,
ChangedStatus:AddedStatus
}
):
t = client._getTokenFor(self)
s = t.status
t.status =
Nothing like good documentation ;-) Where can I find otu about that?
http://www.zope.org/Members/michel/Projects/Interfaces/DTMLSecurityAPI
Is there an equivalent of:
dtml-var _.SecurityGetUser().getUserName()
This works.
___
Zope-Dev
The documentation is in lib/python/AccessControl/DTML.py :)
From: Chris Withers [mailto:[EMAIL PROTECTED]]
dtml-var _.SecurityGetUser().getUserName()
as for simplifying _.SecurityGetUser().getUserName(), BasicUser defines
__str__ to return getUserName(), so dtml-var SecurityGetUser should
Chris McDonough wrote:
Nothing like good documentation ;-) Where can I find otu about that?
http://www.zope.org/Members/michel/Projects/Interfaces/DTMLSecurityAPI
It's also in the security chapter of the Zope Book
*embarrassed grinz*
Randall F. Kern wrote:
as for simplifying
Hi,
a developer who's working with me has been bitten by the following fact
today, one year after me.
There are two methods on objects BasicUser.
One is called has_role and has the following docstring:
Check to see if a user has a given role or roles.
The other one is called hasRole, is an
I've been using zope 2.2.2 with a plugable brain that does something like this:
class Mybrain:
def __init__(self):
self.__dict['myvar'] = 'xyzzy'
I just moved to the latest 2.3 beta and get an error that __dict__ doesn't exist.
Anyone have a quick pointer for a fix, I have 60
At 01:37 PM 4/23/01 +0200, Godefroid Chapelle wrote:
Hello,
After rereading the ZopeSecurityPolicy source code, I tried the
following hack.
I add in the skinscript :
WITH 1 COMPUTE __allow_access_to_unprotected_subobjects__=RESULT
which does work : it fools the security mechanism.
I can
On 23 Apr 2001, at 14:45, Brad Clements wrote:
I've been using zope 2.2.2 with a plugable brain that does something like
this:
class Mybrain:
def __init__(self):
self.__dict['myvar'] = 'xyzzy'
Uh, sorry, this should probably not be on zope-dev.
anyway the answer is
26 matches
Mail list logo