Re: [Zope-dev] several permissions for the same method

2000-07-19 Thread Jephte CLAIN
Dieter Maurer wrote: > Jephte CLAIN writes: > > I have the scenario where a user can edit *its* data but not other > > users's data, unless he has a special role. however, the method used to > > edit one's data is the same. > Can you not use the "Owner" role for this? I suppose not, because dat

Re: [Zope-dev] Re: ZCallable & the Renderable Folders Patch

2000-07-19 Thread Chris Withers
Shane Hathaway wrote: > Offhand I would say that putting a __call__ method in standard folders > would break a lot of DTML. Remember that a namespace lookup tries to > execute the value before returning it. But don't take my word for it, > add a __call__ method to ObjectManager and see what happe

[Zope-dev] Re: ZCallable & the Renderable Folders Patch

2000-07-19 Thread Shane Hathaway
Chris Withers wrote: > Ah, so ZCallable is an inferior ZRenderable? *joke* :-) I made it 'cause it's simpler. And a memory lapse made me forget about Renderable. In fact I think ZCallable is a silly name. Actually the base class ought to be in standard Zope, not a product. And it should use t

Re: [Zope-dev] Zope Add-on Installation

2000-07-19 Thread Chris Withers
Bill Anderson wrote: > I believe he is talkin gabout the __init__ function checking to see if > the .zexp has been imported, and if not, importing it for you. It's an > idea I have kicked around, but haven't tried yet. IIRC, the 'Distribution' tab creates all this for you... It creates a binary

Re: [Zope-dev] Zope Add-on Installation

2000-07-19 Thread Bill Anderson
Chris Withers wrote: > > Dieter Maurer wrote: > > > What is needed is a new way of installing Zope stuff for the following > > > categories: > > > 1. Python Base Products (Like ZPatterns, PTKBase and TrackerBase) > > > 2. Instantiatable Products (like TinyTables, Squishdot and Tracker) > > >

[Zope-dev] ZCallable & the Renderable Folders Patch

2000-07-19 Thread Chris Withers
Steve Alexander wrote: > The __call__ method is what gets invoked when you call the method, > either through the magic of or with "Catalog(client, namespace, args*)">. Now you see, this is what confuses me... renders that method, implying in my mind that __call__ should render stuff adn retur

Re: [Zope-dev] Redirecting from the manage interfaces.

2000-07-19 Thread Steve Alexander
Chris Withers wrote: > > Why I'm asking is 'cos it'd be really nice not to have to keep > re-writing UI when there's perfectly good stuff available in the > management interface, things like add forms, edit forms, etc... > > However, if you call these from anywhere else, they dump you in the > m

Re: [Zope-dev] Redirecting from the manage interfaces.

2000-07-19 Thread Chris Withers
Erik Enge wrote: > > call, it won't redirect. So you should be able to achieve the same > > results just by invoking manage_addImage without including the REQUEST > > object. > > But I have to pass something with the REQUEST, or else it won't add the > image, right? This is the problem we've ex

Re: [Zope-dev] ZPatterns: missing docstring in getItem()

2000-07-19 Thread Chris Withers
"Phillip J. Eby" wrote: > The > local roles stuff is the ability to have a DataSkin get local role > information from "local role providers", thus allowing rules-based local > roles to exist/co-exist with the standard Zope persistently-managed local > roles. How does this fit in / compare / contr

Re: [Zope-dev] Traceback

2000-07-19 Thread Dieter Maurer
[EMAIL PROTECTED] writes: > How hard would it be to add more of the called URL to the traceback? > > ... traceback ... > > Great, I know that I have not put product_number in as a cookie or a hidden > value, and it could not be found by acquisition. It failed in rendering > index_html. Bu

Re: [Zope-dev] Overriding a method in an instance.

2000-07-19 Thread Shane Hathaway
Chris Withers wrote: > > Shane Hathaway wrote: > > I have an idea: the _objects attribute of ObjectManagers could include > > a "configurable" flag, which would tell _checkId that the object can be > > overridden. > > Shane, > > Is this what became the ConfigurableInstances thing at: > http://w

Re: [Zope-dev] Overriding a method in an instance.

2000-07-19 Thread Chris Withers
Shane Hathaway wrote: > I have an idea: the _objects attribute of ObjectManagers could include > a "configurable" flag, which would tell _checkId that the object can be > overridden. Shane, Is this what became the ConfigurableInstances thing at: http://www.zope.org/Members/hathawsh/ConfigurableI

Re: [Zope-dev] Re: Acquisition (was: [Zope-dev] Overriding a method in an instance.)

2000-07-19 Thread Chris Withers
Shane Hathaway wrote: > P.S. I wouldn't mind if someone posted this as a HOWTO. :-) Done :-) cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related l

Re: [Zope-dev] default__class_init__

2000-07-19 Thread Jonothan Farr
My understanding is that the default __class_init__ gets called for you automatically if you don't call it explicitly. --jfarr "Perl is worse than Python because people wanted it worse." Larry Wall, 14 Oct 1998 - Original Message - From: Jeff K. Hoffman <[EMAIL PROTECTED]> To: <[EMAIL PR

[Zope-dev] default__class_init__

2000-07-19 Thread Jeff K. Hoffman
Hello, Should I call default__class_init__ on all of my Python products that care about permissions? Or are there some times when it is not required? --Jeff --- Jeff K. Hoffman 704.849.0731 x108 Chief Technology Officer mailto:[EMAIL PROTECTED]

Re: [Zope-dev] Expanded "access" file

2000-07-19 Thread Phillip J. Eby
At 12:50 PM 7/19/00 -0400, Shane Hathaway wrote: >"Phillip J. Eby" wrote: >> >> At 11:09 AM 7/19/00 -0400, Shane Hathaway wrote: >> >> >> >> Patch opportunity, perhaps? :) Ty and I would do it, no problem. Heck, >> >> I've been tempted to do it as a LoginManager function, since Zope doesn't >>

Re: [Zope-dev] Expanded "access" file (was Re:LoginManagerpatch consideredharmful)harmful)

2000-07-19 Thread Shane Hathaway
"Phillip J. Eby" wrote: > > At 11:09 AM 7/19/00 -0400, Shane Hathaway wrote: > >> > >> Patch opportunity, perhaps? :) Ty and I would do it, no problem. Heck, > >> I've been tempted to do it as a LoginManager function, since Zope doesn't > >> pay attention to anything past the first line of the

Re: [Zope-dev] Expanded "access" file (was Re: LoginManagerpatch consideredharmful)harmful)

2000-07-19 Thread Phillip J. Eby
At 11:09 AM 7/19/00 -0400, Shane Hathaway wrote: >> >> Patch opportunity, perhaps? :) Ty and I would do it, no problem. Heck, >> I've been tempted to do it as a LoginManager function, since Zope doesn't >> pay attention to anything past the first line of the "access" file... > >We would be mos

Re: [Zope-dev] Expanded "access" file (was Re: LoginManagerpatch consideredharmful)harmful)

2000-07-19 Thread Shane Hathaway
"Phillip J. Eby" wrote: > > At 10:15 AM 7/19/00 -0400, Shane Hathaway wrote: > >Chris Withers wrote: > >> > >> "Phillip J. Eby" wrote: > >> > Maybe, maybe not. I think perhaps the most compelling argument from > >> > Digital Creations' viewpoint for having an expanded "access" file > might be >

Re: [Zope-dev] Expanded "access" file (was Re: LoginManagerpatch consideredharmful)harmful)

2000-07-19 Thread Chris Withers
"Phillip J. Eby" wrote: > >You speak in the past tense. This is only a suggestion and a > >possibility. It's not as important as some other feature requests. > > > > Patch opportunity, perhaps? :) Ty and I would do it, no problem. Heck, > I've been tempted to do it as a LoginManager function,

Re: [Zope-dev] Intializing theobjectsformerly-known-as-RackMountables

2000-07-19 Thread Phillip J. Eby
At 05:54 PM 7/19/00 +0300, Itamar Shtull-Trauring wrote: >"Phillip J. Eby" wrote: > >> If what you want is default values, then just put them in a DataSkin >> property sheet in the ZClass. Or, if using a Python class, implement them >> as class attributes named "class_default_for_X". E.g.: > >I

Re: [Zope-dev] Expanded "access" file (was Re: LoginManager patch consideredharmful)harmful)

2000-07-19 Thread Phillip J. Eby
At 10:15 AM 7/19/00 -0400, Shane Hathaway wrote: >Chris Withers wrote: >> >> "Phillip J. Eby" wrote: >> > Maybe, maybe not. I think perhaps the most compelling argument from >> > Digital Creations' viewpoint for having an expanded "access" file might be >> > the simplification of the setup proce

[Zope-dev] 2 ZEO Wikis.

2000-07-19 Thread Chris McDonough
In trying to find the "Quorum Based Replication" stuff I've found that we have two ZEO wikis. http://www.zope.org/Products/ZEO/Wiki/FrontPage http://www.zope.org/Wikis/ZEO/FrontPage Bleah. Chris McDonough Digital Creations Publishers of Zope - http://www.zope.org

Re: [Zope-dev] Intializing the objectsformerly-known-as-RackMountables

2000-07-19 Thread Phillip J. Eby
At 05:41 PM 7/19/00 +0300, Itamar Shtull-Trauring wrote: > >class ASPAccount(LoginUser, MemberMixin): > >def __init__(self, id, title=''): >LoginUser.__init__(self, id) >self.__dict__['_currentPayment'] = None >self.__dict__['debt'] = Payment.Debt(0.0) >self.__d

Re: [Zope-dev] Intializing the objectsformerly-known-as-RackMountables

2000-07-19 Thread Itamar Shtull-Trauring
"Phillip J. Eby" wrote: > >Doing self.__dict__['name'] = 'Rincewind' seems kinda ugly. Maybe newItem > >should by default call a function on newly created objects, say __init? I > >don't want to have to subclass Specialist (or in my case, LoginManager) each > >time I want to this, since it's a

Re: [Zope-dev] HTTP user agent?

2000-07-19 Thread Martijn Pieters
On Wed, Jul 19, 2000 at 04:57:12PM +0900, Brian Takashi Hooper wrote: > Hi Zopistas, > > For anyone that might know: > > Is there a particular reason that the User-Agent header is not part of > the request data that ZServer sends in the environment to ZPublisher? > > It looks like the user agen

Re: [Zope-dev] Expanded "access" file (was Re: LoginManager patch consideredharmful)harmful)

2000-07-19 Thread Shane Hathaway
Chris Withers wrote: > > "Phillip J. Eby" wrote: > > Maybe, maybe not. I think perhaps the most compelling argument from > > Digital Creations' viewpoint for having an expanded "access" file might be > > the simplification of the setup process for customers. And it would also > > make it easier

Re: [Zope-dev] Intializing the objects formerly-known-as-RackMountables

2000-07-19 Thread Phillip J. Eby
At 12:42 PM 7/19/00 +0300, Itamar Shtull-Trauring wrote: >I need to do initialize some properties of new instances of a DataSkin >subclass - ASPAccount. However, I can't put this in __init__ since the >object hasn't been stored at that point. > >Doing self.__dict__['name'] = 'Rincewind' seems k

[Zope-dev] Another ZPatterns bug

2000-07-19 Thread Itamar Shtull-Trauring
(ZPatterns 0.4a5, Zope 2.2.0) If an agent raises an exception, you don't get to see the traceback. Instead, the object is simply not added (if the exception was in _objectAdded, donno what happens in _objectChanged). This makes debugging agents basically impossible... -- Itamar S.T. [EMAIL PR

Re: [Zope-dev] several permissions for the same method

2000-07-19 Thread Oleg Broytmann
On Wed, 19 Jul 2000, Jephte CLAIN wrote: > I have the scenario where a user can edit *its* data but not other > users's data, unless he has a special role. however, the method used to > edit one's data is the same. > So I make sure inside the edit_data method that the user has the > adequate permi

[Zope-dev] several permissions for the same method

2000-07-19 Thread Jephte CLAIN
Hello, is it possible for a single method, under Zope 2.1.6, to have several permissions? ie __ac_permission__ = ( ('edit my data', 'edit_data'), ('edit others\'s data', 'edit_data'), ) I have the scenario where a user can edit *its* data but not other users's data, unless he has a spec

[Zope-dev] Intializing the objects formerly-known-as-RackMountables

2000-07-19 Thread Itamar Shtull-Trauring
I need to do initialize some properties of new instances of a DataSkin subclass - ASPAccount. However, I can't put this in __init__ since the object hasn't been stored at that point. Doing self.__dict__['name'] = 'Rincewind' seems kinda ugly. Maybe newItem should by default call a function on

[Zope-dev] HTTP user agent?

2000-07-19 Thread Brian Takashi Hooper
Hi Zopistas, For anyone that might know: Is there a particular reason that the User-Agent header is not part of the request data that ZServer sends in the environment to ZPublisher? It looks like the user agent can also be provided to Zope's request object just by adding a line for 'user-agent'