[Zope-dev] Auto password expiry based on time
Hi all, I have been trying to find a way to make the password to a zope site expire after a limited fixed time, unsuccesfully using python. I know I have to use acl_users but which file to modify in zope (which is used to log in the user)is the question. Also does this mean I have to recompile zope? Any help or direction would be highly appreciated. Regards Subhankar Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com ___ 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-dev] why cant i import types
Add a folder called GlobalModules in your Products directory and put in that folder a file called '__init__.py' with this content: from Products.PythonScripts.Utility import allow_module allow_module('types') with this you can't use "from types import *" but you can use the second form "from types import ListType, StringType, ..." Il ven, 2003-08-15 alle 04:18, Declan Shanaghy ha scritto: > Can someone tell me why i cant import types into my python > script in CMF? > When i put either of the following lines as the first line > of my script i get the error that follows > > from types import * - produces > Error Type: ImportError > Error Value: "from types import *" is not allowed > > from types import ListType - produces > Error Type: ImportError > Error Value: import of "ListType" from "types" is > unauthorized. You are not allowed to access ListType in > this context > > > ___ > 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 ) -- paolo <[EMAIL PROTECTED]> Noze srl ___ 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-dev] DBTab/ZEO configuration in Zope2.7 beta1
Hi Chris, thank you. By the time I got it working when I first used filestorage, bootet zope so it created all folders as it wants and then stop zope and use that Data.fs for ZEO. Then I was able to mount the zeo as / I'll investigate this further and provide the examples. For now even the fallback seems to work. Storage type "temporary" seems to not mentioned anywhere, but I'll test this too. Kind regards Tino Wildenhain Chris McDonough wrote: This is because the default is to mount a temporary storage at /temp_folder. Since you overrode the default, you need to specify the tempfolder storage in the config. Something like this (untested) as an additional zodb_db entry should work: name sessions mount-point /temp_folder On Fri, 2003-08-15 at 16:40, Tino Wildenhain wrote: Just a step in between: I found ZODB/component.xml, where there seem to be the definition of the relevant section of zope.conf. server localhost:12345 mount-point / cache-size 5000 pool-size 7 version-pool-size 3 version-cache-size 100 path $INSTANCE/var/Images.fs mount-point /images ... zopectl debug yields the following: File "Zope/lib/python/OFS/Application.py", line 349, in initialize tf._setObject('session_data', toc) AttributeError: _setObject strange. Perhaps the temp_folder isnt mounted? There is no reference of the tempstorage in the above definition file... Tino Wildenhain wrote: Hi Chris, Chris McDonough wrote: mkzopeclient -z should go away. You should use the zope.conf file to configure mounted databases. Unfortunately I haven't had time to include adequate examples in the sample config, but it might help a bit to look at the lib/python/Zope/Startup/zopeschema.xml file. That was the second thing I did :-) (first was to look into doc/) I spottet the following directives: (Seems to be specifiable multiple times) ok, I can somehow stick ZEO.ClientStorage.ClientStorage into it, but what then? How to set options for ClientStorage? Hostname, Port, Cache, Fall-back-Storages (as supported by DBTab) I can provide the examples for the template once I have working ones... Regards Tino ___ 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 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 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 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-dev] DBTab/ZEO configuration in Zope2.7 beta1
This is because the default is to mount a temporary storage at /temp_folder. Since you overrode the default, you need to specify the tempfolder storage in the config. Something like this (untested) as an additional zodb_db entry should work: name sessions mount-point /temp_folder On Fri, 2003-08-15 at 16:40, Tino Wildenhain wrote: > Just a step in between: > > I found ZODB/component.xml, where > there seem to be the definition of > the relevant section of zope.conf. > > > > server localhost:12345 > > mount-point / > cache-size 5000 > pool-size7 > version-pool-size3 > version-cache-size 100 > > > > > path $INSTANCE/var/Images.fs > > mount-point /images > ... > > > > zopectl debug yields the following: > > File "Zope/lib/python/OFS/Application.py", line 349, in initialize > tf._setObject('session_data', toc) > > AttributeError: _setObject > > > strange. Perhaps the temp_folder isnt mounted? > > There is no reference of the tempstorage in the above definition file... > > > > Tino Wildenhain wrote: > > Hi Chris, > > > > Chris McDonough wrote: > > > >> mkzopeclient -z should go away. You should use the zope.conf file to > >> configure mounted databases. Unfortunately I haven't had time to > >> include adequate examples in the sample config, but it might help a bit > >> to look at the lib/python/Zope/Startup/zopeschema.xml file. > > > > > > That was the second thing I did :-) (first was to look into doc/) > > > > I spottet the following directives: > > > > > > (Seems to be specifiable multiple times) > > > > > > > > ok, I can somehow stick ZEO.ClientStorage.ClientStorage > > into it, but what then? How to set options for > > ClientStorage? Hostname, Port, Cache, Fall-back-Storages > > (as supported by DBTab) > > > > I can provide the examples for the template once I have > > working ones... > > > > Regards > > Tino > > > > > > ___ > > 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 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 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-dev] DBTab/ZEO configuration in Zope2.7 beta1
Just a step in between: I found ZODB/component.xml, where there seem to be the definition of the relevant section of zope.conf. server localhost:12345 mount-point / cache-size 5000 pool-size 7 version-pool-size 3 version-cache-size 100 path $INSTANCE/var/Images.fs mount-point /images ... zopectl debug yields the following: File "Zope/lib/python/OFS/Application.py", line 349, in initialize tf._setObject('session_data', toc) AttributeError: _setObject strange. Perhaps the temp_folder isnt mounted? There is no reference of the tempstorage in the above definition file... Tino Wildenhain wrote: Hi Chris, Chris McDonough wrote: mkzopeclient -z should go away. You should use the zope.conf file to configure mounted databases. Unfortunately I haven't had time to include adequate examples in the sample config, but it might help a bit to look at the lib/python/Zope/Startup/zopeschema.xml file. That was the second thing I did :-) (first was to look into doc/) I spottet the following directives: (Seems to be specifiable multiple times) ok, I can somehow stick ZEO.ClientStorage.ClientStorage into it, but what then? How to set options for ClientStorage? Hostname, Port, Cache, Fall-back-Storages (as supported by DBTab) I can provide the examples for the template once I have working ones... Regards Tino ___ 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 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-dev] DBTab/ZEO configuration in Zope2.7 beta1
Hi Chris, Chris McDonough wrote: mkzopeclient -z should go away. You should use the zope.conf file to configure mounted databases. Unfortunately I haven't had time to include adequate examples in the sample config, but it might help a bit to look at the lib/python/Zope/Startup/zopeschema.xml file. That was the second thing I did :-) (first was to look into doc/) I spottet the following directives: (Seems to be specifiable multiple times) ok, I can somehow stick ZEO.ClientStorage.ClientStorage into it, but what then? How to set options for ClientStorage? Hostname, Port, Cache, Fall-back-Storages (as supported by DBTab) I can provide the examples for the template once I have working ones... Regards Tino ___ 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-dev] DBTab/ZEO configuration in Zope2.7 beta1
mkzopeclient -z should go away. You should use the zope.conf file to configure mounted databases. Unfortunately I haven't had time to include adequate examples in the sample config, but it might help a bit to look at the lib/python/Zope/Startup/zopeschema.xml file. On Fri, 2003-08-15 at 15:11, Tino Wildenhain wrote: > Hi, > > looking thru code, examples and documentation, > it seems DBTab is included into Zope2.7. > Now how to configure it? Should I use > a dbtab.conf file as it was with 2.6? > The mkzopeclient.py with -z option > just builts a custom_zodb.py which does > not seem to be very 2.7-alike. > > Shouldn't that configuration not be in zope.conf? > I cannot find relevant tags for the > tag. > > Are there any places I could look into for enlightement? > > Regards > Tino Wildenhain > > > ___ > 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 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] DBTab/ZEO configuration in Zope2.7 beta1
Hi, looking thru code, examples and documentation, it seems DBTab is included into Zope2.7. Now how to configure it? Should I use a dbtab.conf file as it was with 2.6? The mkzopeclient.py with -z option just builts a custom_zodb.py which does not seem to be very 2.7-alike. Shouldn't that configuration not be in zope.conf? I cannot find relevant tags for the tag. Are there any places I could look into for enlightement? Regards Tino Wildenhain ___ 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-dev] Packing (still) hosed in 2.6.2?
>>> "Jeremy Hylton" wrote > I don't recall that any of the pack bugs that we fixed caused this sort of > error. My first guess would be that the file is a bit damaged, perhaps in a > way that the old pack did not check. > Can you run fsdump.py and see if that output sheds any light. It will give > you a detailed text summary of all the transactions and data records. You > could use the dump to figure out if, for example, the two numbers in the > error message are indeed transaction header locations. Ok. The original error, reformatted for clarity: ZODB.fspack.CorruptedError: /app/zope/dev_csr_server/recover/Data.fs:9200838: data record does not point to transaction header: 17391715 != 9200760 Here's the 3 transactions (one before, dead one, one after). There's definately a screwed transaction there. offset: 9198385 end pos: 9200752 transaction id: 033bb0f41f05f3aa trec len: 2367 status: ' ' user: ' jasonb' description: '/admin_tools/accounts/update_account/manage_edit' len(extra): 0 offset: 9198463 oid: 000206bb revid: 033bb0f41f05f3aa previous record offset: 9193826 transaction offset: 9198385 len(data): 2247 redundant trec len: 2367 offset: 9200760 end pos: 9202513 transaction id: 033bb0f4b80ad42a trec len: 1753 status: 'u' user: ' jasonb' description: '/admin_tools/accounts/update_account/manage_edit' len(extra): 0 offset: 9200838 oid: 000206bb revid: 033bb0f4b80ad42a previous record offset: 17389418 # woopsie transaction offset: 17391715 # woopsie len(data): 1633 redundant trec len: 1753 offset: 9202521 end pos: 9204883 transaction id: 033bb0f7be87736e trec len: 2362 status: ' ' user: ' jasonb' description: '/admin_tools/accounts/update_account/manage_edit' len(extra): 0 offset: 9202599 oid: 000206bb revid: 033bb0f7be87736e previous record offset: 9198463 transaction offset: 9202521 len(data): 2242 redundant trec len: 2362 So, fixing this. fsrecover.py doesn't do the right thing, unfortunately. It just leaves the broken record alone. I'm not sure if making fsrecover handle this class of error is useful... It should be simply a matter of walking through the transactions, and patching the one that's busted. Or alternately, simply skipping it. I'll look into fixing this now. More in a bit. Anthony ___ 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] 501 NotImplemented in Zope 2.7 beta1
I have been noticing a few "501 Not Implemented" errors in the ZMI in 2.7 beta. The ones I have encountered are fixed by changing method="get" to method="post" in the html/dtml forms in e.g., Aqueduct.py. I do not know the "proper" fix. Also, this is weird enough (and perhaps merely a beta issue) that I could not decide the proper category in the bug collector or even what to search on to see if it had been reported previously. So, consider this an FYI should anyone want to take a stab at fixing it or reporting it to the collector. -- Jim Washington ___ 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-dev] Packing (still) hosed in 2.6.2?
Woohoo! Fixed. I created an empty file, then used copyTransactionsFrom to copy all transactions across. This patched the backpointers. fsrecover.py should probably get some smarts to do something like this as well, but I've spent far too long on this problem already... :-/ from ZODB import FileStorage infilename='/app/zope/dev_csr_server/recover/Data.fs' outfilename='/app/zope/dev_csr_server/recover/Out.fs' outfs = FileStorage.FileStorage(outfilename) infs = FileStorage.FileStorage(infilename) outfs.copyTransactionsFrom(infs) I have some small patches to fsdump that outputs expected prev records alongside the actual ones, is this useful enough to check in? Anthony ___ 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 )