[Zope-dev] Security Permissions
Hi, i have found the Security Permission below in the Zope Root that are not definded by myself. A D G Z a d h r s t Who can tell me where these Permissions come from? as ___ 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] ZPatterns Mailing List?
Hi, Just noticed there are loads of ZPatterns posts on [EMAIL PROTECTED] Would it help to have a ZPatterns list? Is there one? Could Ethan set one up? cheers, Chris ___ 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] ZPatterns getPersistentItemIDs() bug?
Steve Spicklemire wrote: This is a known problem. Use: dtml-let itemIDs="[]" dtml-in "addressRack.getPersistentItemIDs()" sort dmtl-call "itemIDs.append(_['sequence-item'])" /dtml-in Hmmm... that's not very nice, has the bug in getPersistentItemIDs() been fixed? cheers, Chris ___ 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] Re: ZPatterns getPersistentItemIDs() bug?
Hi Chris, It looks like it's a non-bug, more just an annoyance. Here's my current feeling. In most 'real' situations you'll end up with a ZCatalog, or possibly a totally virtual ZClass with some sort of dynamic (SQL? LDAP? etc.. ) data source where the ids you're after will be queried for. My own practice at this point is to define methods at the rack level like: getAllItemIds, getRejectedItemIds, getCurrentItemIds and so on. These can then be implemented in a way that matches the actual data storage. *If* the data is stored persistently, and *if* you are implementing 'getAllItemsIds' and *if* you don't have a handy ZCatalog around to query, then you can use the hack I sent Roche. ;-) Otherwise there are better ways to do it anyway. The reason it's a probem is that getPersistentItemIDs() returns a BTree object, that isn't allowed to be exposed directly by the security machinery. However, 'sort' short-curcuits the machinery so that you can 'handle' them (in this hack, you store them in a simple python list). Anyway.. it's not clear it's a bug worth fixing... if it's a bug at all. -steve "Chris" == Chris Withers [EMAIL PROTECTED] writes: Chris Steve Spicklemire wrote: This is a known problem. Use: dtml-let itemIDs="[]" dtml-in "addressRack.getPersistentItemIDs()" sort dmtl-call "itemIDs.append(_['sequence-item'])" /dtml-in Chris Hmmm... that's not very nice, has the bug in Chris getPersistentItemIDs() been fixed? Chris cheers, Chris Chris ___ 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] Mail and zope
Is there anyway to get a hold off the message-id of e-mail sent through the sendmail tag? Roché ___ 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 )
Re: [Zope-dev] Mail and zope
Roch'e Compaan wrote: Is there anyway to get a hold off the message-id of e-mail sent through the sendmail tag? I would have thought the message-id would only get generated by the MTA once the sendmail tag has finished doing its thing :-( cheers, Chris ___ 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 )
RE: [Zope-dev] CVS bug
I recently checked out a CVS version of Zope, and upon firing it up, it gives an unauthorized error on the default index_html. You know, the one that is included by default, that welcomes you to zope. After changing it, and checking to verify that view is selected, etc. it still does so. Has there been any progress on this? Hi Bill - this should be fixed if you update your CVS checkout... Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ 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 )
Re: [Zope-dev] Mail and zope
Is there anyway to get a hold off the message-id of e-mail sent through the sendmail tag? As far as I can see, there isn't any generation of a message-id in the MailHost product. If you want to get a hold of the message-id, the right thing would probably be to generate it yourself, and adding it in the header field of the message you're sending.. I.e., something like this (untested): dtml-call "REQUEST.set('message_id', _.str(_.whrandom.random()) + '@yourhost.com')" dtml-sendmail To: dtml-var mail_to From: [EMAIL PROTECTED] Message-ID: dtml-var mesage_id /dtml-sendmail Although using a message-id generated from one of the python library modules would be a better way of doing it.. HTH. -Morten ___ 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] Create Virtual DataSkin
This simple issue is driving me crazy... I am trying to create a DataSkin with some Properties in a MySQL database. So I have an ID, NAME, and DESCRIPTION that is in REQUEST and using: dtml-let ni="newItem(key=REQUEST['key'])" nips="ni.propertysheets.get('Basic')" dtml-call "nips.manage_changeProperties(REQUEST=REQUEST)" /dtml-let The item gets created but the Properties are not changed. Can someone please post the ADD/CHNAGE Trigger syntax and accompanying ZSQL Methods for a simple creation of a DataSkin ZClass. Much appreciated. ___ 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 )
Re: [Zope-dev] ANNOUNCE: PartitionedFileStorage
Phil Harris wrote: Chris, Any hints/tips on how you did this (just to save me from having to do any work of course ;)) I just used WinZip to extract the tarball in the /ZODB directory. Sadly, it didn't work, and won't do until the next version fo Zope is released :-( cheers, Chris ___ 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] Non-TTW ZPatterns
Hi, I think (shock, horror) I'm finally starting to understand ZPatterns ;-) (well, okay, just a little bit then...) Anyway, I'm wondering how I'd go about making a ZPatterns-based project that is totally file system based. The reasons for this are CVS-ability, the ability to update the 'product' without trashing the data, the ability to easily duplicate the 'system' without copying the data, better editing environment, etc, but I'm not sure how I'd go about it. It seems as though all the cool bits (like SkinScript methods, order of racks and the like) are in Zope's 'instance space' with ZPatterns. Does this have to be so or could all the 'setting up' be stored/changed in Python or other filesystem-based stuff? If so, how so? I guess I'm talking about HTMLFile-like things for SkinScript and ZSQL methods, amongst others. Possible, or am I off my rocker (again ;-) cheers, Chris ___ 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] Fishbowl proposal: HookablePUTCreation
I have just created a fishbowl proposal for hooking the creation of new objects during HTTP/FTP PUT operations: http://dev.zope.org/Wikis/DevSite/Proposals/HookablePUTCreation Note that this proposal stems from my hack this weekend, which makes it possible to create portal content via FTP; I am confident that this is a *short* project. Please comment at the discussion page, Tres. ___ 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 )
Re: [Zope-dev] ANNOUNCE: PartitionedFileStorage
Chris Withers wrote: Phil Harris wrote: Chris, Any hints/tips on how you did this (just to save me from having to do any work of course ;)) I just used WinZip to extract the tarball in the /ZODB directory. Sadly, it didn't work, and won't do until the next version fo Zope is released :-( I just realized I could use the "patch" command to backport. So I made a new tarball. Have fun! http://www.zope.org/Members/hathawsh/PartitionedFileStorage/PartitionedFileStorage-0.0.1-2_2.tar.gz/view Shane ___ 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 )
Re: [Zope-dev] Create Virtual DataSkin
Hmm... since triggers are done at transaction commit time, could it be that the 'change' trigger doesn't happen if the change occurs on the same transaction as an 'add'? -steve "bentzion" == bentzion [EMAIL PROTECTED] writes: bentzion This simple issue is driving me crazy... I am trying to bentzion create a DataSkin with some Properties in a MySQL bentzion database. So I have an ID, NAME, and DESCRIPTION that is bentzion in REQUEST and using: bentzion dtml-let ni="newItem(key=REQUEST['key'])" bentzion nips="ni.propertysheets.get('Basic')" dtml-call bentzion "nips.manage_changeProperties(REQUEST=REQUEST)" bentzion /dtml-let bentzion The item gets created but the Properties are not bentzion changed. bentzion Can someone please post the ADD/CHNAGE Trigger syntax bentzion and accompanying ZSQL Methods for a simple creation of a bentzion DataSkin ZClass. bentzion Much appreciated. ___ 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 )
Re: [Zope-dev] RFC: Python/Zope Interfaces
Dieter Maurer wrote: Michel Pelletier writes: Also, defining the interface seperately keep the two things apart, impementation and interface, and doesn't allow you to sneak in a new method unless you also sneak it into the interface, thus making a stronger "contract" with the user. I am a bit astonished by this statement: I know the "design by contract" concept from Bertrand Meyer, the Eiffel developper. In Eiffel, essential parts of the contract, among others method prototype, pre- and post-conditions as well as invariants are build directly into the language. A documentation tool extracts these parts from the source to generate the interface, for people that are only interested in how to use the class/method. Programms can be executed in a way, that the various (executable) contract parts can be checked at runtime. *THIS* provides for quite a strong contract. I cannot see, why the separation of interface and implementation should make the contract stronger. I do see, however, that it makes it more likely to be broken by the implementation. The "contract" is a policy. The mechanisms of interfaces should not require that the policy be "strong" or "weak". This is up to the contractor. I'm not sure if you are making these statement because you disagree with the current proposal or because you disagree with what I said above. What I said above was just a scenario, not necessarily any position I advocate. The current python interface proposal makes no statement on the strength of a contract. It sounds like you want your contracts to be strong, fine, but Python has no explict compile-time or run-time interface enforcement. The proposal in question is just trying to define how interfaces are defined, created, implemented, and used. Strong contractual enforcement is a minor, policy-specific decision. It is a very good thing to have the specification very near to the implementation -- as a permanent guide to the implementor. It is even better, when big parts of the specification becomes part of the executable code (as is the case for Eiffel's pre- and post-conditions). Maybe. I disagree in this case: this proposal states that interfaces are discoverable documentation, not language or policy enforcement. The less they can be tied to specific policies the more flexible they can be. Keep in mind, if you want run-time interface enforcement, you can *allways* add it with mxProxy or some other mechanism. If you *don't* want run-time interface enforcement and we made it a requirement, you'd be stuck. You can allways add, but you can rarely take away. -Michel ___ 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] Lots more in the interfaces Wiki
Hello, I have added a lot more content to the interfaces wiki at: http://www.zope.org/Wikis/Interfaces/FrontPage (note, this is not the old interfaces wiki, which is link to from here). This wiki is the realization of last weeks interfaces proposal: http://www.zope.org/Wikis/Interfaces/OriginalProposal So far, I have gone pretty far into defining the first goal of the project "what is an interface". For those of you that are interested in looking at the prototype implementation, a new version can be downloaded from: http://www.zope.org/Members/michel/Products/Interfaces/ Some user and higher-fiber documentation can be found in the wiki. Please check out the wiki and let me know what you think about interfaces. These are important components that you will see a lot of in the future, so we want your input! -Michel ___ 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 )
RE: [Zope-dev] Create Virtual DataSkin
At 02:34 PM 11/27/00 -0800, Ben Schochet wrote: Seems that way Steve. I have tried to do this in an external method with self.get_transaction.commit(1) before doing the changeProperties, but that didn't seem to work. You want get_transaction().commit(1), if you're doing it from Python. DataSkins also have a commitSubtransaction() method that can be used to do this. Is there another way to do this? the CHANGE trigger works fine on its own. How are others creating new items with properties from an HTML FORM? Should I be doing this another way? I can't wait to figure out ZPatterns, I think it is the best way to create Zope applications! It seems to allow you to have the best of Zope objects along with your data secure and accessible from a RDBMS. (At least that is the value I see, there are probably others...) You can't have an ADDED and CHANGED both fire in the same subtransaction. ADDED, CHANGED, and DELETED are mutually exclusive. So your ADDED trigger has to perform the same operations to save data as your change trigger would. One easy way to do this is to do: WHEN OBJECT ADDED ...stuff to do for adding only WHEN OBJECT ADDED,CHANGED ...stuff to do when changing or adding Since the triggers are fired in order, and both triggers fire on add, that should be pretty easy to set up. Note that in this case, you won't need to commit a subtransaction. Subtransaction commits are really pretty rarely needed. About the only time you should *normally* need a subtransaction commit is that if you have triggers you want to take effect before you move on, like triggers that update an index you're about to search. The normal assumption in Zope however is that you generally keep your read and write transactions seperate; i.e. a POST usually results in a redirect to the updated object, or something of that sort. ___ 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 )
Re: [Zope-dev] Create Virtual DataSkin
At 08:34 PM 11/27/00 -0500, [EMAIL PROTECTED] wrote: Thanks Phillip. Is there a way to pass my REQUEST info to the ADD Trigger? I am under the impression that only "self" and some other ZPattern specific properties are available to the trigger. You also have access to everything in the acquisition hierarchy of the trigger or SkinScript method itself, which of course includes REQUEST. So either REQUEST (which would look it up in the trigger's acquisition hierarchy) or self.REQUEST (which would look it up in the DataSkin's acquisition hierarchy) should work fine. Now that I've told you *how* to get at it, however, I should warn against making too much use of the request to get information that could've/should've been passed to the DataSkin by application or domain code. It makes sense to use the request if you want to log things about the request that caused the change, but it's probably not a good idea to be looking at form fields and such, since that would introduce an undesirable coupling between your application structure and your triggers. Ideally, triggers should only look to the DataSkin for anything other than methods or constants they need to carry out their job. In practice of course, if you want to do something like log the AUTHENTICATED_USER and whether they were logged in via SSL, then of course the REQUEST is the right way to do it. ___ 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 )
Re: [Zope-dev] Questions, Jar, Transactions, Metaclassess, ZPatterns
sorry for the poorly worded question (midnight madness), let me try and restate them a bit better in the fond hope that someone will answer any of them. whats is a jar? as far as i know its just the data representation of the object that gets stored in the zodb, hence its directly related to the __dict__ of the object. but then what is the signifigance of calling methods directly on the jar like i see in some of the transaction machinery, is this an indirect call to the thread's zodb connection? does zope restrict you from doing metaprogramming with python products? or does zope's own metaprogramming reserve some names __klass__, etc? i was reading through guido's essays yesterday, and happened upon the metaprogramming essay ( i read it when i was first learning python but it made a lot more sense now:). i was thinking about creating my own caching metaclass, but i know that acquisition (and probably persistence, and zclasses) use some c-based metaclasses to work. i'm just curious what the possibilites and restrictions are of doing metaclasses in zope, so my classes play well with others. in /lib/python/Shared/DC/ZRDB/TM.py, i see the class Surrogate defining methods for __inform_commit__ and __inform_abort__, what are these for? In ZPatterns/Transaction.py I see some talk of transaction boundaries, namely the inability for an object participating in the transaction to know that a transaction is finished. From my understanding of transactions i thought that an object could assume a transaction was over if it has its tpc_finish called on it when its not in a subtransaction. I understand that the Zpatterns problem here might be related to providing attrs to other objects which might be used in a tpc_finish but i just wanted to clarify/make sure. kapil ___ 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 )
Re: [Zope-dev] objectValues performance
Brett Carter wrote: I have a folder with greater than 5000 ZClass instances in it. It takes 5mins to do an objectValues for every object in the folder - is there a higher perfomance call I could make? -Brett use a catalog. (which only help if you want a filtered set or a schema attrs of the object) beefing up your memory (assuming you want zope to use alot), could also help, assuming these objects are accessed frequently enough to stay in the object cache. kapil ___ 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 )
RE: [Zope-dev] Mail and zope
Is there anyway to get a hold off the message-id of e-mail sent through the sendmail tag? As far as I can see, there isn't any generation of a message-id in the MailHost product. [snip] Thanks for the suggestion, this is what I'm trying to do: We're building a customer relationship management system and one part of it is a request tracking system. For a particular request there can be many tasks assigned to various supporters. A supporter can give feedback to customer from a task assigned to him. If the customer replies to this task via e-mail I want to associate that message with the task where the feedback originated from but most e-mail clients discard custom headers but preserve a 'In-Reply-To' header with the original message-id. This is what I do currently: If the supporter sends feedback to the customer I send a copy of the mail back into zope to get the message-id generated by the MTA and then store the message with the approriate task. When the customer replies to this message I search a catalog for the original message-id via the 'In-Reply-To' header and then associate the reply with the correct task. In this way one can keep track of all correspondence on a specific task. If I can generate the message-id like you suggested then I don't have to send a copy of the message back into zope but can save a copy directly in Zope. Any other suggestions would be more than welcome. Roché ___ 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] Loginmanager and LDAP
Hi. I'd like to authenticate users using LDAP and Active Directory. Zope is running on a RH7.0 box. Has anyone done this, is it possible? /Magnus ___ 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 )