[Zope-dev] Refernecing a zope page template's id ad title from a python script.
Hi, I have a breadcrumbs python filesystem script. It's a long script that constructs dictionaries and places them in a list for a master_template to display. The dictionaries look like this relative = context.portal_url.getRelativeContentPath(context) code for various things ... ordinaryUrl = portal_url + '/' + join (relative, '/') ordinaryId = relative[-1] ordinaryD = { 'id': ordinaryId , 'title' : obj.title_or_id() , 'url' : ordinaryUrl} In some cases I need to get an id for a zope page template instead of for 'context'. Can anybody tell me how to do that, or better yet tell me where the way to do it is documented? I haven't had much luck searching the source code for something that'll help. cheers, Phil ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
RE: Zope + Ape + Subversion (was: RE: [Zope-dev] Using a truely r evis ion based storage for Zope ?)
On Mon, 2004-04-19 at 13:33, Shane Hathaway wrote: > On Sun, 18 Apr 2004, Kapil Thangavelu wrote: > > should we move this discussion to an ape specific mailing list? > > I'm happy with zope-dev and zodb-dev, but if there's a good reason to make > a new list, that's fine. > its a knowledge discovery issue, there's a lot of useful info ape info floating around on diseparate mailing lists which makes it hard to get a hold of, having a single mailing focused on ape would make it much easier for folks to get up to speed and see all the cool stuff that can be done and that people are doing with ape ;-) cheers, -kapil ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
RE: Zope + Ape + Subversion (was: RE: [Zope-dev] Using a truely r evis ion based storage for Zope ?)
On Sun, 18 Apr 2004, Kapil Thangavelu wrote: > part of the reason i never used ape as a means for svn integration was > was that this imo, mix of high level application operations with zodb > storage level operations never seemed a proper fit as it required > bypassing the storage interface for richer semantic operations. ie i see > reverting a revision, tagging a content tree, or diffing mulitiple > revisions as application operations. still, there have been the some > compelling ideas here about using zodb/ape as an interface. FWIW, Ape is also designed to be useful as an import/export mechanism. In theory, if you set up a mapper configuration for a set of classes, you've gained both a database bridge and a clean format for importing and exporting objects. I imagine that would benefit many kinds of applications. In practice, I haven't tried it yet. :-) > should we move this discussion to an ape specific mailing list? I'm happy with zope-dev and zodb-dev, but if there's a good reason to make a new list, that's fine. Shane ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: RFC: A proposal for ZODB schema migration in Zope 3
On Sat, 17 Apr 2004 08:14:35 -0400 Jim Fulton <[EMAIL PROTECTED]> wrote: > > I've posted a proposal: > >http://dev.zope.org/Zope3/DatabaseGenerations > > for a framework for managing the migration of application/database > schemas in ZODB databases in an orderly manner. The proposal is to > apply this new framework in Zope 3, however, if it works well, it > would be applicable to Zope 2 and other ZODB applications. > > Comments are welcome. +1 It might be nice if some of this mechanism was distributed in ZODB itself, or at least the ZODB docs pointed to the implementation as an example of how it could be done. This is definitely a problem not limited to Zope. -Casey ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: I want to fix App.Management.Tabs.manage_workspace
On Mon, 19 Apr 2004 10:16:08 +0100 Chris Withers <[EMAIL PROTECTED]> wrote: > Hi there, > > App.Management.Tabs.manage_workspace sucks as I've described in > http://zope.org/Collectors/Zope/1286: > > 1. manage_workspace is only protected by the Authenticated role, and > that is done directly, not even through a permission. I think that is probably because this method is an abstraction for the default managment screen. It does not know what the correct permission is, but assumes you at least must be logged in to see any management screen. What are you suggesting to do about this? > 2. self.filtered_manage_roles then limits the options of what can be > shown, which might end up being nothing. But, because the method is > only protected by 'Authenticated', no chance is given to specify other > user credentials (say, from a user folder higher up in the tree) which > might be able to see something. Can you give a concrete use case for what you describe? > 3. There's a bare try/except which masks errors. From what I can see, > it should ONLY catch IndexError's. Yep, bare excepts == bad. Kill it. > 4. The "raise TypeError" could do with some explanation. Ok. > 5. The Unauthorized could raise a more helpful message "You are not > authorized to view an of this object's management itnerface" -0, I think it may be better to say nothing which discloses less information to would-be attackers. Perhaps VerboseSecurity might be able to elaborate, I dunno. > What do people feel about the right way to solve this? 3,4 and 5 I'm > comfortable with fixing, but I'm stumped as to what "the right thing" > is to do on 1 and 2 which combine to create a thorny problem. > > The semantics I want are: "Show the 1st management tab the user is > allowed to see, if they're not allowed to see anything, check if a > user of the same name further up the userfolder tree can see anything" Why? Is this consistent with behavior elsewhere? Are you concerned that lower user folders could lock out global managers by creating non-privileged users with the same name locally? I say YAGNI unless this behavior is somehow inconsistent. > Is that right? If so, how do I go about implementing it? Finally, what > branches should I do this on? 2.7 and the HEAD are likely suspects for bug fixes. I doubt there will be another 2.6 release. -Casey ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] I want to fix App.Management.Tabs.manage_workspace
Hi there, App.Management.Tabs.manage_workspace sucks as I've described in http://zope.org/Collectors/Zope/1286: 1. manage_workspace is only protected by the Authenticated role, and that is done directly, not even through a permission. 2. self.filtered_manage_roles then limits the options of what can be shown, which might end up being nothing. But, because the method is only protected by 'Authenticated', no chance is given to specify other user credentials (say, from a user folder higher up in the tree) which might be able to see something. 3. There's a bare try/except which masks errors. From what I can see, it should ONLY catch IndexError's. 4. The "raise TypeError" could do with some explanation. 5. The Unauthorized could raise a more helpful message "You are not authorized to view an of this object's management itnerface" What do people feel about the right way to solve this? 3,4 and 5 I'm comfortable with fixing, but I'm stumped as to what "the right thing" is to do on 1 and 2 which combine to create a thorny problem. The semantics I want are: "Show the 1st management tab the user is allowed to see, if they're not allowed to see anything, check if a user of the same name further up the userfolder tree can see anything" Is that right? If so, how do I go about implementing it? Finally, what branches should I do this on? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )