"Phillip J. Eby" a écrit :
>
> It sounds to me like you need to be using the getId() method instead of the
> .id attribute. I think that the id attribute is being phased out in favor
> of getId().
I was already told about the getId but the problem goes further than access to
the id.
I get the s
On Mon, 23 Apr 2001, Tim McLaughlin wrote:
> 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:
> se
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
s
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'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 min
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,
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 simplifyi
The documentation is in lib/python/AccessControl/DTML.py :)
> From: Chris Withers [mailto:[EMAIL PROTECTED]]
>
as for simplifying _.SecurityGetUser().getUserName(), BasicUser defines
__str__ to return getUserName(), so should
result in the same output as
-Randy
_
> 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:
>
>
This works.
___
Zope-Dev maillist - [EMAIL PROTECTED]
http://list
"Randall F. Kern" wrote:
>
> _.SecurityGetUser()
Nothing like good documentation ;-) Where can I find otu about that?
Is there an equivalent of:
Something like:
...would be great.
cheers,
Chris
___
Zope-Dev maillist - [EMAIL PROTECTED]
http
Hi!
So here's more :)
> >def _objectAdding(self,client,
> >_tmap={ None:AddedStatus,
> >DeletedStatus:ChangedStatus,
> >ChangedStatus:AddedStatus
> >}
> >):
> >t = client._getTokenFor(self)
> >s = t.status
> >
_.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
http://lists.zope.or
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, precond
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 me
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
Chris McDonough wrote:
>
> Can you give me something that reproduces this?
I already gave you more than I should have ;-)
2.3.2b2 solves this so I think moving to that might be easier than fixing this.
All the tests seem to have miraculously started passing today (wtf?!!) so I'm
more confused b
Chris McDonough wrote:
>
> Alternately (and this will be in the next CST release), add this to the
> session data object class (SessionData.SessionData):
>
> __guarded_setitem__ = __setitem__
OK, that'll teach me to read the whole thread before I post :-)
> As far as finding the currently logg
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,
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 deprecat
> 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
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 an
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
/usr/home/magnus/www/Zope-2.3.1-src/lib/python/Products/
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:
> >
>
> 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
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 t
> 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 Ma
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
d'oh!
Error type: TypeError
Error value: unsubscriptable object
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 publish
File E:\Zope\2379A4~1.1\l
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 i
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 problem
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 h
31 matches
Mail list logo