Re: [Zope] local and global site manager, adapter and utility questions

2013-06-11 Thread Thierry Florac

Hi Tamer,

Le Sun, 09 Jun 2013 17:30:26 +0200,
  Tamer Higazi  a écrit:

> Hi Thierry!
> Thanks for your lat response, meanwhile things are getting more and
> more clear to me.
> 
> I got it meanwhile to register utilities through the
> globalSiteManager, and I am now very familiar now with zca basics
> (though that I have much more to learn of it's API)
> 
> There is something totally unclear to me!
> 
> 
> I got 2 applications registered in the
> "/storage/PyProjects/ztfyAPP/etc/configure.zcml"
> 
> tamer@office /storage/PyProjects/ztfyAPP/src $ ls -lA
> insgesamt 16
> drwxr-xr-x 2 tamer tamer 4096  9. Jun 07:40 appsx
> drwxr-xr-x 2 tamer tamer 4096 20. Mai 16:13 appsx.egg-info
> drwxr-xr-x 4 tamer tamer 4096  9. Jun 07:43 webapp
> drwxr-xr-x 2 tamer tamer 4096 20. Mai 02:35 webapp.egg-info
> 
> 
> that is "webapp" and "appsx"
> 
> so far so good.
> 
> At /storage/PyProjects/ztfyAPP/src/appsx/__init__.py:
> 
> I globally registered a class, which definied previously as a utility.
> 
> 
> from Services import *
> from zope.component import getGlobalSiteManager
> from zope.component import getUtilitiesFor,queryUtility
> 
> gsmx = getGlobalSiteManager()
> 
> VAT = VATServices()
> gsmx.registerUtility(VAT,IVATServices,'VAT')
> 
> 
> 
> now I want to have access this utility in the global sitemanager from
> one other app.
> 
> /storage/PyProjects/ztfyAPP/src/webapp/__init__.py:
> 
> from myhello import HelloView
> from zope.component import getGlobalSiteManager
> 
> #print list(getUtilitiesFor('IVatServices'))
> 
> gsmx2 = getGlobalSiteManager()
> gsmx2.queryUtility(IVATServices,'VAT').Hallo()
> 
> 
> I thought it is in the memory. Okay, that the interface is not
> available in the other application is clear.
> 
> 
> But, how do I access components or utilities registered in a different
> application globally, at one other application at all ?!


There are two points about your configuration:

1. It's a personal choice but I never add code inside a ZTFY.webapp
   environment. My application code is always written in external
   packages, and only referenced in my execution environments (by
   updating setup.py, buildout.cfg and configure.zcml).

2. Anyway, if both of your applications are correctly referenced in
   configure.zcml and included in the global registry, you should be
   able to use any of it's components from anywhere in your code. So my
   question is simple: are you sure that the second application (appsx)
   is correctly included in your execution environment and registered?
   You can check that by using the apidoc tool (in debug mode, using
   http://localhost:8080/++apidoc++ by default) and searching for one
   of your interfaces or utilities registered in this package...

Regards,
Thierry

___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] local and global site manager, adapter and utility questions

2013-05-14 Thread Thierry Florac

Hi,

Le Tue, 14 May 2013 06:55:38 +0200,
  Tamer Higazi  a écrit:

> 1. What is the difference between a global and a localSiteManager from
> the zope.component package?!
> 
> How do I have to understand that a "globalSiteManager" resists in
> memory, and a localSiteManager is persistent ?!
> 
> Could somebody of you explain it to me?!

Yes, there are two kinds of complementary "registries" (or "site
managers"):
 - a global one, mainly build by ZCML (or "static") declarations
 - a local one, which is made of persistent components registered into
   the ZODB. Local components are "contextual", so are only available
   (by default) to objects "attached" to the site manager inside which
   these components are defined. This registry is mainly specific to
   Zope applications so if you build a ZCA-based application outside of
   Zope, you will probably don't have a local registry.

Where you are looking for a component, search is made at first in the
local registry, then in the global one.


> 2. What is the difference between an adapter and a utility ?! I
> register an adapter as well the same way as I do with a utility, and
> I query those 2 as well. But what's the point there?!

A utility is a simple named component which provides an interface;
it's generally a singleton.
An adapter, on the opposite, takes one or more objects arguments (each
providing a given interface) to return an object providing another
interface.

Regards,
Thierry

P.S.: please avoid cross-posts!
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Error: Picked: Jinja2 = 2.6

2013-05-06 Thread Thierry Florac
Le Fri, 03 May 2013 23:16:39 +0200,
  Tamer Higazi  a écrit:

> Sorry Martijn,
> I am a stupid beginner with bluebream, therefore where is the
> "[versions]" section ?!

# grep "\[versions\]" *
buildout.cfg:[versions]

At least, it should be like that!

:-)
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] changing permissions on classes/methods at runtime?

2012-03-02 Thread Thierry Florac

Hi,


Le Wed, 29 Feb 2012 15:12:37 +0100,
  Jürgen Herrmann  a écrit:

> is it possible to change permissions and roles on classes/methods
> at runtime? normally you'd attach security declarations inline in
> your class definition code:
> 
> from AccessControl import ClassSecurityInfo
> from AccessControl.class_init import InitializeClass
> class Cls():
>security = ClassSecurityInfo()
>security.declarePrivate('foo')
>def foo(self):
>  pass
> InitializeClass(Cls)
> 
> 
> now what i tried at runtime is:
> 
> from mycode import Cls
> from AccessControl import ClassSecurityInfo
> security = ClassSecurityInfo()
> security.declarePublic('foo')
> security.apply(Cls)
> 
> but this does not what i want it to, in fact it doesn't seem
> to do anything yet - probably because i'm using the wrong way :)
> 
> any hints how to do this correctly would be greatly appreciated.
> 
> thank you very much in advance and best regards,

The way I handle this kind of problem is:
 - declare me method as protected, with a specific permission
 - grant this permission to roles or users (which can be "anybody")
   according to your context.

Best regards,
Thierry
-- 
  Chef de projets internet/intranet
  Office National des Forêts
  Direction des Systèmes d'Information
  2, Avenue de Saint Mandé
  75570 PARIS Cedex 12

  Tél. : 01 40 19 59 64
  Fax. : 01 40 19 59 85
  Mél. : thierry.flo...@onf.fr
  WWW  : http://www.onf.fr
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] enhancements to RAM cache manager product

2012-02-09 Thread Thierry Florac
Le Wed, 08 Feb 2012 23:42:58 -0600 (CST),
  sathya  a écrit:

> ram cached pages using the ram cache manager product seems to be a
> nice way to improve response times. 
> 
> As far as I remember it did not work well with ZEO.
> 
> Is there any merit to reengineering this product to use memcached as
> the backend instead of ZODB/ZEO ?
> 
> If so would anyone have an interest to work on this as a funded
> project ?
> 
> It will be great to hear about newer and better solutions as well.


Hi,

I used RAM cache a while a few months ago on a Zope (3.3.1) install
with a ZEO context and didn't notice any problem ; and as far as I
know, I don't see any link between them, as cached data is stored in
memory and not in the ZEO database.

Actually, I switched to memcached to be able to share cache data (as
well as sessions data) between several front-ends. This required just a
small interface and two adapters (one to work with a RAM cache and
another one to work with memcached).

No problem for me to share experience if you want to work on a
dedicated package.

Best regards,
Thierry
-- 
  Chef de projets internet/intranet
  Office National des Forêts
  Direction des Systèmes d'Information
  2, Avenue de Saint Mandé
  75570 PARIS Cedex 12

  Tél. : 01 40 19 59 64
  Fax. : 01 40 19 59 85
  Mél. : thierry.flo...@onf.fr
  WWW  : http://www.onf.fr
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] [zope-dev] zope.app.authentication / zope.pluggableauth problem

2011-05-03 Thread Thierry Florac

Hi,

I've built an XML-RPC application built on Zope3 (3.4.1) components.
I noticed that when a user is having one or more colons in his
password, an exception is raised :

File '/var/local/eggs/zope.app.wsgi-3.4.3-py2.5.egg/zope/app/wsgi/__init__.py', 
line 55 in __call__
  request = publish(request, handle_errors=handle_errors)
File 
'/var/local/eggs/zope.publisher-3.4.10-py2.5.egg/zope/publisher/publish.py', 
line 130 in publish
  obj = request.traverse(obj)
File '/var/local/eggs/zope.publisher-3.4.10-py2.5.egg/zope/publisher/http.py', 
line 464 in traverse
  ob = super(HTTPRequest, self).traverse(obj)
File '/var/local/eggs/zope.publisher-3.4.10-py2.5.egg/zope/publisher/base.py', 
line 252 in traverse
  publication.callTraversalHooks(self, obj)
File 
'/var/local/eggs/zope.app.publication-3.4.4-py2.5.egg/zope/app/publication/zopepublication.py',
 line 129 in callTraversalHooks
  self._maybePlacefullyAuthenticate(request, ob)
File 
'/var/local/eggs/zope.app.publication-3.4.4-py2.5.egg/zope/app/publication/zopepublication.py',
 line 116 in _maybePlacefullyAuthenticate
  principal = auth.authenticate(request)
File 
'/var/local/eggs/zope.app.authentication-3.4.4-py2.5.egg/zope/app/authentication/authentication.py',
 line 72 in authenticate
  credentials = credplugin.extractCredentials(request)
File 
'/var/local/eggs/zope.app.authentication-3.4.4-py2.5.egg/zope/app/authentication/httpplugins.py',
 line 89 in extractCredentials
  login, password = base64.decodestring(credentials).split(':')
ValueError: too many values to unpack


So maybe I'm wrong, but shouldn't the last instruction be replaced
with :

  login, password = base64.decodestring(credentials).split(':', 1)


Regards,

Thierry Florac
-- 
Chef de projets intranet/internet
Office National des Forêts - Département Informatique
2, Avenue de Saint-Mandé
75570 Paris Cedex 12
Tél. : 01 40 19 59 64
Fax. : 01 40 19 58 85
Mél. : thierry.flo...@onf.fr
Web. : http://www.onf.fr
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Save references in a list as object attribut

2010-01-29 Thread Thierry Florac
Le vendredi 29 janvier 2010,
  Vladislav Vorobiev  a écrit :
==
> I try to save references to objects as attribute in a list.
> 
> object.refList=getattr([self.
> context.pfad, 'object'],
> [self.context.pfad, 'object1'])
> 
> After adding and transaction commit I can get my linked objects with
> all attributes and methods
> 
> myObject.refList
> []
> 
> myObject.refList[0].objectValues()[0].getPhysicalPath()
> ('', 'path', 'object')
> 
> myObject.refList[0].objectValues()[0].absolute_url()
> http://localhost/pfad/object
> 
> I restart the instance and get some other results
> 
> myObject.refList
> []
> 
> myObject.refList[0].objectValues()[0].getPhysicalPath()
> ('object',)
> 
> myObject.refList[0].objectValues()[0].absolute_url()
> 'object'
> 
> It seems that the in list referenced object ist no more in context
> after restart.
> 
> the constructor for this looks like:
> 
> object  = myObject()
> id=myObject
> myObject.id   = id
> myObject.title= id
> myObject.refList=getattr([self.context.pfad, 'object'],
> [self.context.pfad, 'object1'])
> self.context._setObject(id, ob)
==

Modifying an object's list attribute "in place" doesn't mark the
persistent object as modified ; so as soon as the object is removed from
the cache, it's modifications are lost.

You should probably :
 - use persistent lists (persistent.list.PersistentList) instead of
   "basic" lists
 - mark object as modified manually (myObject._p_changed = True)
 - or change value of object list attribute :
   myList = myObject.refList
   myList[0] = ...
   myObject.refList = myList

Hope this helps,
Thierry
-- 
Chef de projets intranet/internet
Office National des Forêts - Département Informatique
2, Avenue de Saint-Mandé
75570 Paris Cedex 12
Tél. : 01 40 19 59 64
Fax. : 01 40 19 58 85
Mél. : thierry.flo...@onf.fr
Web. : http://www.onf.fr

___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] unittest a component that is using zope.dublincore

2009-03-30 Thread Thierry Florac
Le samedi 28 mars 2009 à 15:46 +0100, Jean-Michel FRANCOIS a écrit :
> Hi,
>   I m trying to make my first content type with zope3. The code is
> available there: http://github.com/toutpt/z3weblog.entry/tree
> 
> I m following the second edition of the book "web component developement
> with zope3", i know this is not the last edition. So, i m making a
> ISized component for my simple content type, with a simple unittest, but
> now, i want to use zope.dublincore package and i get an error when i m
> launch the tests:
> 
> =
> (zope3apps)tou...@linux-tggd:~/workspace/zope3apps/apps/prout> .bin/test
> Running tests at level 1
> Running unit tests:
>   Running:
> ...
> 
> Error in test test_size_for_display
> (z3weblog.entry.tests.test_size.EntrySizeTestCase)
> Traceback (most recent call last):
>   File
> "/home/toutpt/outils/python_system/2.5.4/lib/python2.5/unittest.py",
> line 260, in run
> testMethod()
>   File
> "/home/toutpt/workspace/zope3apps/apps/prout/src/z3weblog.entry/src/z3weblog/entry/tests/test_size.py",
> line 21, in test_size_for_display
> msg = self.size.sizeForDisplay()
>   File
> "/home/toutpt/workspace/zope3apps/apps/prout/src/z3weblog.entry/src/z3weblog/entry/size.py",
> line 24, in sizeForDisplay
> unit, chars = self.sizeForSorting()
>   File
> "/home/toutpt/workspace/zope3apps/apps/prout/src/z3weblog.entry/src/z3weblog/entry/size.py",
> line 18, in sizeForSorting
> dc = dcI.IZopeDublinCore(self.context)
> TypeError: ('Could not adapt',  object at 0x839382c>,  zope.dublincore.interfaces.IZopeDublinCore>)
> 
> .
> 
> Error in test test_size_for_sorting
> (z3weblog.entry.tests.test_size.EntrySizeTestCase)
> Traceback (most recent call last):
>   File
> "/home/toutpt/outils/python_system/2.5.4/lib/python2.5/unittest.py",
> line 260, in run
> testMethod()
>   File
> "/home/toutpt/workspace/zope3apps/apps/prout/src/z3weblog.entry/src/z3weblog/entry/tests/test_size.py",
> line 16, in test_size_for_sorting
> unit, size = self.size.sizeForSorting()
>   File
> "/home/toutpt/workspace/zope3apps/apps/prout/src/z3weblog.entry/src/z3weblog/entry/size.py",
> line 18, in sizeForSorting
> dc = dcI.IZopeDublinCore(self.context)
> TypeError: ('Could not adapt',  object at 0x839382c>,  zope.dublincore.interfaces.IZopeDublinCore>)
> 
> 
>   Ran 4 tests with 0 failures and 2 errors in 0.007 seconds.
> 
> Tests with errors:
>test_size_for_display (z3weblog.entry.tests.test_size.EntrySizeTestCase)
>test_size_for_sorting (z3weblog.entry.tests.test_size.EntrySizeTestCase)
> 
> 
> 
> The trace back is very clear, the zope.dublincore components are not
> loaded. The question is : what is the best way to load components in
> unittests ? Do just i have to load the zcml of zope.dublincore, or do i
> have to register only needed components, if so how can i do that ?


You can also provide your own adapter and register it for your tests.
This example is extracted from zope.app.container unit tests :


from datetime import datetime
from zope.security import checker
from zope.dublincore.interfaces import IZopeDublinCore
from zope.app.testing import ztapi

class EntrySizeTestCase(unittest.TestCase):

def setUp(self):
class FauxDCAdapter(object):
implements(IZopeDublinCore)

__Security_checker__ = checker.Checker(
{"created": "zope.Public",
 "modified": "zope.Public",
 "title": "zope.Public",
 },
{"title": "zope.app.dublincore.change"})

def __init__(self, context):
pass
title = 'faux title'
size = 1024
created = datetime(2001, 1, 1, 1, 1, 1)
modified = datetime(2002, 2, 2, 2, 2, 2)

ztapi.provideAdapter(IZODBWeblogEntry, IZopeDublinCore,
FauxDCAdapter)


Not tested anyway, but hope will help...

  Thierry Florac
-- 
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Mél : thierry.flo...@onf.fr
  Tél. : +33 01.40.19.59.64
  Fax. : +33 01.40.19.59.85

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] redirect timeout doesn't work

2009-03-11 Thread Thierry Florac
Le mercredi 11 mars 2009 à 14:59 +0200, Dvir Bar-lev a écrit :
> I want to redirect a user from my page to another page after a certain
> time, I put this code in the dtml  page at the top I want to redirect
> from:
> 
>  
> 
>  Address’)">

Maybe I'm wrong but I think it should be something like :

  setHeader('Refresh', '5;URL=http://...')


  Thierry Florac
-- 
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Mél : thierry.flo...@onf.fr
  Tél. : +33 01.40.19.59.64
  Fax. : +33 01.40.19.59.85

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Periodic task in a Zope 2 environment

2009-02-16 Thread Thierry Florac
Le lundi 16 février 2009 à 16:59 +0100, Marco Bizzarri a écrit :
> Hi all.
> 
> A little of background, before.
> 
> I need to run some tasks, inside a zope environment, in a periodic
> way. Even though I could resort to using cron and wget, I do not like
> the solution too much, also because it requires me to rely on
> something completly external to the application to schedule the task
> itsel (I need to update the cron to change how often a job is run...
> ).
> 
> 
> Now, I can see I can run a task using zopectl run + a script. My
> script would therefore be something like:
> 
> while True:
>  do something
>  sleep(for sometime)
> 
> 
> of course, there are dozen of ways to write this in a better way, but
> that is not the problem. My problem is understanding if it is possible
> to run such a script via the zdaemon. Can anyone shred some light on
> this topic?


Hi,

I don't know if it's the best way, but I've implemented a "cron like"
task base class for my Zope-2.9 instance, which :
 - is thread based
 - can launch operations in a "cron like" way
 - can act as the user of your choice.

It doesn't actually provide any user interface to define task
scheduling, but the main base class could probably be used as a good
starting point ; at least, it works ;-).
I can send you the source code on request...


  Thierry Florac
-- 
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Mél : thierry.flo...@onf.fr
  Tél. : +33 01.40.19.59.64
  Fax. : +33 01.40.19.59.85

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] writing repozo messaging output to a file....

2009-02-05 Thread Thierry Florac
Le jeudi 05 février 2009 à 07:45 -0800, Stephan Richter a écrit :
> On Thursday 05 February 2009, michael nt milne wrote:
> > Ran the task and nothing was written to any of the files?
> 
> Just specify an absolute path then. You do not have to create the file; it is 
> created for you. Mmh, maybe the output is written stderr, in which case this 
> would not work, but I am pretty sure that unix shell has an answer for that 
> too; just read up on it.


If messages are written to stderr instead of stdout, then you should
do :

  repozo.py [your params]> /var/log/repozo.log 2>&1

to have all outputs into specified file.

If you only want to log errors, then :

  repozo.py [your params]2> /var/log/repozo.log

With hope this helps,

  Thierry Florac
-- 
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Mél : thierry.flo...@onf.fr
  Tél. : +33 01.40.19.59.64
  Fax. : +33 01.40.19.59.85

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] urllib2 timeout problem inside Zope thread

2008-07-24 Thread Thierry Florac

  Hi,

I'm currently using urllib2 to get an external URL from an internal
"cron like" Zope thread.
The loaded page has to manage administrative tasks before I can start
other tasks into Zope internal database ; it returns partial chunks of
data, but globally takes more than 20 minutes to run.

Problem : when loading the page via a simple Python console, I set
socket.setdefaulttimeout() and everything is OK ; but when launching the
same command from inside Zope thread, I get a socket.timeout error.

So my question : as I'd really prefer to keep this method call inside an
internal Zope thread, how can I prevent this timeout ?

Thanks for any help,

  Thierry Florac
-- 
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Mél : [EMAIL PROTECTED]
  Tél. : +33 01.40.19.59.64
  Fax. : +33 01.40.19.59.85

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Unrestricted threads

2008-07-23 Thread Thierry Florac
Le mardi 22 juillet 2008 à 19:43 +0200, Eric Bréhault a écrit :
> Hello Thierry,
> 
> To schedule cron-like tasks on Zope, I use ZpCron:
> http://www.zope.org/Members/janik/ZpCron
> 
> It works pretty fine (well, as far as you do not use ZEO) and it
> allows to define the user you want to use to run such or such task,
> and the Zope security mechanisms are applied just like if the user had
> run the task himself.


  Hi,

Thanks for the link... but I use ZEO :-(
Anyway, the information was very useful because this product contains
all the security related code that I was looking for...

Many thanks,

  Thierry Florac
-- 
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Mél : [EMAIL PROTECTED]
  Tél. : +33 01.40.19.59.64
  Fax. : +33 01.40.19.59.85

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Unrestricted threads

2008-07-22 Thread Thierry Florac

  Hi,

I use Zope-2.9.9.
I need to create custom "cron like" threads in an application to handle
administrative tasks.
Global setup of these threads is already OK.

So my question is : how can I setup these threads so that they can
handle database objects in an unrestricted way (eventually throught an
authentication mecanism) ?

Thanks for any help,

  Thierry Florac
-- 
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Mél : [EMAIL PROTECTED]
  Tél. : +33 01.40.19.59.64
  Fax. : +33 01.40.19.59.85

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZSyncer and Zope-2.8.0

2005-08-05 Thread Thierry FLORAC
Well... so I'm probably unlucky !!
I've also tested with Sascha's method (http://username:[EMAIL PROTECTED]) but
then I have a 'host/servname not known' error :-( !!
I'm probably going to wait for a 2.8 compatible release...

  Thierry


On Fri, 2005-08-05 at 08:51 -0500, Paul Winkler wrote:
> Note, I have done zero testing of zsyncer with zope 2.8.
> It is not officially supported yet. If it works, lucky you ;-)
> 
> -PW
> 
> > Am Freitag, 5. August 2005 09:16 schrieb Thierry FLORAC:
> >>   Hi,
> >>
> >> I'm trying to use ZSyncer 0.6.1 to synchronise simple objects (page
> >> templates...) between a Zope-2.7.6 source database and a Zope-2.8.0
> >> destination database (both on Solaris with Python 2.3.4).
> >> I'm using a user which have a "Manager" role on both sides, but I
> >> can't manage ZSyncer to work : an "Unauthorized" exception is always
> >> raised ! I can't even manage to see a listing of the different
> >> folders.
> >>
> >> Any help would be great !!
> >
> > hi thierry,
> >
> > i've seen the same. i get around it by including username:password into
> > the  url of the remote syncer, something like
> >
> > http://username:[EMAIL PROTECTED]/ZSyncer
> >
> >
> >
> > hope this helps,
> >
> > sascha


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] ZSyncer and Zope-2.8.0

2005-08-05 Thread Thierry FLORAC





  Hi,

I'm trying to use ZSyncer 0.6.1 to synchronise simple objects (page templates...) between a Zope-2.7.6 source database and a Zope-2.8.0 destination database (both on Solaris with Python 2.3.4).
I'm using a user which have a "Manager" role on both sides, but I can't manage ZSyncer to work : an "Unauthorized" exception is always raised !
I can't even manage to see a listing of the different folders.

Any help would be great !!


Thanks,

  Thierry



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Customizing Zope FTP server

2005-07-12 Thread Thierry FLORAC





  Hi,

I'm currently working on a Zope site, providing FTP access to some of it's sub-folders.
My questions are :
 - is it possible to customise Zope FTP server so that a specific banner and a specific message are displayed on login ?
 - is it possible to "redirect" a user to a specific folder after a successful connection ?

Thanks for any help,

  Thierry



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Problem with manage_FTP...

2005-06-13 Thread Thierry FLORAC




Hi,

I'm actually building with Zope (2.7.6) , through the development of a custom product, a small file server, available through FTP, HTTP or WebDAV with access controlled by an LDAP server (with LDAPUserFolder).
Everything works fine with every protocol concerning access rights.

The only thing that I don't manage to do is, in FTP or WebDAV, to restrict a user view (a directory listing) to the only files that he can effectively download (for these files, they can be effectively downloaded, but they are actually seen in the list !).

I've tried to play with "manage_FTPlist" and "manage_FTPstat" methods, both on my folderish product and on my custom folder items (by returning exceptions or returning None values), but didn't manage until now to get a good result (the list is often completely empty when access is forbidden even for a single file !).

Any help would be welcome !!


Thanks,

Thierry



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ldap

2005-04-22 Thread Thierry FLORAC




On Fri, 2005-04-22 at 12:46 +0200, Jens Vagelpohl wrote:


On Apr 22, 2005, at 11:38, Fabio Marcone wrote:

> Hi!
> I'm looking for a zope-ldap howto. In particular I need to use a ldap
> connection in a zpt and I set Connection and Filter LDAP correctly (in 
> test
> page) but not in a zpt (I have a key error on ldap filter)
>
> Anyone can help me?

If you are talking specifically about the ZopeLDAP product, that's been 
deprecated years ago and has not seen any maintenance for 4 years or 
so.



Hi,

I actually use the LDAPUserFolder (release 1.6) product with Zope-2.6.1.
I plan to upgrade to Zope-2.7.x in a few months. 
Is this product always maintained and functional with Zope-2.7 ?

Thanks,

  Thierry


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )