[Zope] Freelancing fees
Hi guys, I've been working for the same Zope or Django projects for virtually 5 years now, but recently, the circumstances and I reached an agreement concluding that it's time to start looking at freelancing. In consequence I need to set an hourly fee rate for the team. So, I'm running a small studio in Argentina, taking both graphic design and programming stuff. The GD fee may be easier for me to figure than the programming one; particularly, I was wondering if the fact of knowing Zope2 very well added any cent to the general programming fee (whatever that could be). I know there are uncountable factors that make up this figure, but in order to achieve some kind of reference: Off the top of your heads, which is a reasonable hourly fee for a project/task/client including zope-specific skills in the job description? $/€ 1, 15, 30, 50, 100, 300, ...? Furthermore: how much if it doesn't? Regards, Pablo Ziliani PS: any tip on getting Python/Zope freelance jobs, highly appreciated ___ 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] Appropriate Photo / Photo Folder for Zope 2.10.2?
Hello all, I'm having trouble to find an appropriate version for the Photo/Photo Folder product to run under 2.10.2. I'm currently using Roug's 1.3.1[1] which throws some warnings upon start[2]. Also, there's a more recent ExtFile[3] product that I'd like to use if it played well with Photo. Maybe I should use the (much older) Zope3 version?[4] Can anybody please give me a hand with this? (working links are appreciated) TIA, Pablo [1] http://www.zope.org/Members/Roug/Photo [2] WARNING Init Class Products.Photo.Photo.Photo has a security declaration for nonexistent method 'jpgcomment' 2007-02-06 10:53:11 WARNING Init Class Products.Photo.Photo.Photo has a security declaration for nonexistent method 'jpgcomment' /Products/Photo/__init__.py:32: DeprecationWarning: The ImageFile module will be removed in Zope 2.11. Use App.ImageFile instead. from ImageFile import ImageFile [3] http://www.zope.org/Members/shh/ExtFile [4] http://svn.zope.org/photo/ I guess, since the link in rbrickers' Z2 version page is broken (http://www.zope.org/Members/rbickers/Photo) ___ 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] Appropriate Photo / Photo Folder for Zope 2.10.2?
Hi Andrew, Thanks for your answer. FWIW I decided to keep the version (1.3.1) since it is the last release at the moment. It also seems to play well with ExtFile (at least Zope omitted the included ExtFile in favor of the standalone one). Just for the records, Photo does include a JpgComment.py file (different case) but not a method with that name. Thanks, Pablo Andrew Milton wrote: +---[ Pablo Ziliani ]-- | Hello all, | | I'm having trouble to find an appropriate version for the Photo/Photo | Folder product to run under 2.10.2. | I'm currently using Roug's 1.3.1[1] which throws some warnings upon | start[2]. Also, there's a more recent ExtFile[3] product that I'd like | to use if it played well with Photo. Maybe I should use the (much older) | Zope3 version?[4] | Can anybody please give me a hand with this? (working links are appreciated) | [2] WARNING Init Class Products.Photo.Photo.Photo has a security | declaration for nonexistent method 'jpgcomment' This is a fairly harmless warning. It is declaring a set of permissions for jpgcomment. Perhaps the method was removed, and the permissions declaration was missed. ___ 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] ZPT problems upgrading 2.9.6 to 2.10.2
Hi all again, As I mentioned in my previous email I'm in the middle of an upgrade from 2.9.6 to 2.10.2, and getting (at least) a couple of errors: Sometimes when a ZPT that gets content from the database (postgres, psycopg 2.0.4) is called, it raises the following UnicodeDecodeError: Module zope.tal.talinterpreter, line 754, in do_insertStructure_tal UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 164: ordinal not in range(128) I've also seen it failing in presence of a 0xc2 byte, and I haven't tested if this is the usual behavior for a non ascii. I have the following directives in the zope.conf file: - rest-input-encoding utf-8 - rest-output-encoding utf-8 - default-zpublisher-encoding utf-8 All my admin forms have an accept-charset=utf-8. So, any hint on why it uses the ascii codec? am I omitting anything? If the problem is in the database, is there any way to pass a replace or ignore argument for unicode error handling? (maybe the DB should do that?). Again, although I don't really know how much garbage was being actually served, the same requests worked under 2.9.6. BTW, I don't think I can isolate where this offending insertion occurs from this traceback (I might be wrong on this, but I think I remember that in previous versions of Zope you could get the line number, or at least the actual culprit's filename) Also, my main template (the file that contains the macro that is used by most other pages) is showing this message when editing TTW: Macro expansion failed exceptions.NameError: name 'widget' is not defined And that's because I have this code: tal:block condition=PAGE/widgets repeat=widget PAGE/widgets metal:singleton use-macro=python:path('context/widgets_sidebar.html/macros/' + widget) / /tal:block Of course the expected macro does exist in the file when the variable widget is evaluated. This not only shows when editing the template itself, but also when doing it on every page that uses it. No, the checkbox Expand macros when editing is not selected an any level. Fortunately, this doesn't prevent the page from being served properly. It does show this warning in the log, though (I can see it when something ELSE fails afterwards): Module zope.pagetemplate.pagetemplate, line 117, in pt_render - Warning: Macro expansion failed - Warning: exceptions.NameError: name 'widget' is not defined Thanks in advance and sorry for the length of this post. Pablo ___ 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] Resolving a url from a path in a virtual host environment
Hi guys, I'm having some trouble tying to get an object from a given path. I'm using virtual hosts, so according to Dieter's great documentation[1], REQUEST.resolve_url should do it. However no matter how creative I get making up urls, I always get a Different namespace. ValueError. Looking at the source of resolve_url[2] I can see that it tries to ensure being at the same namespace (?) seeing if REQUEST.script is at the beginning of the passed url. So the actual problem is that this attribute always returns http://127.0.0.1:8080; in my (2.9.4-final) Zope instance, quite independently from my requested url. So: should I be using some other method instead? (if so, I guess my reference is wrong or outdated). Which one? Do I need any special configuration to make REQUEST.script returns my virtual environment? Any additional suggestion? In case the real url after apache's rewrite is relevant, PATH_INFO and PATH_TRANSLATED are showing something like: '/VirtualHostBase/http/www.mydomain.com:80/sites/mysite/VirtualHostRoot/foo/bar.py' TIA, Pablo [1] : Quoting http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html#c37ac15c11b4: Unless your site uses /virtual hosts/ (or the virtual hosting tools for a different purpose) restrictedTraverse is almost the inverse of absolute_url. [...] The true inverse of absolute_url is the method resolve_url of the request object. [2] http://svn.zope.org/Zope/trunk/lib/python/ZPublisher/HTTPRequest.py?rev=68751view=markup ___ 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] Weird paths in the filesystem using Photo and ExtFile
Thanks a lot, Stefan, for your kind response, I didn't see that. Although it's not clear to me who is responsible for this, I suppose that because of this feature, storing Photos in the filesystem should be discouraged in multiple virtual host environments and that a big warning message added at least to this product's readme file. Regards, Pablo Stefan H. Holek wrote: Hi Pablo, This comment from the ExtFile source code may shed some light on the issue. Photos can for historical reasons, and without changes to the Photo product, not take advantage of ZODB_PATH = PHYSICAL. # XXX: The Photo product uploads into unwrapped ExtImages. # As we can not reliably guess our parent object we fall back # to the old behavior. This means that Photos will always # use ZODB_PATH = VIRTUAL independent of config settings. Stefan On 25. Aug 2006, at 21:54, Pablo Ziliani wrote: For example, if I call these real urls: - http://zopeserver.com:8080/sites/site1/images/image.jpg?display=whatever - http://zopeserver.com:8080/sites/site2/images/image.jpg?display=whatever in the filesystem I would have something like: - $INSTANCE_HOME/var/photos/sites/site1/images/image.jpg/image_whatever.jpg - $INSTANCE_HOME/var/photos/sites/site1/images/image.jpg/image_whatever.jpg but if I call the same via the virtual url: - http://www.virtualsite1.com/images/image.jpg?display=whatever - http://www.virtualsite2.com/images/image.jpg?display=whatever I only get: $INSTANCE_HOME/var/photos/images/image.jpg/image_whatever.jpg -- Anything that, in happening, causes something else to happen, causes something else to happen. --Douglas Adams ___ 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] Weird paths in the filesystem using Photo and ExtFile
Hi all, I am experimenting some problems with Photo/Photo Folder (or ExtFile) products in a fresh Zope instance. I have two different sites that share a very similar structure. Their virtual roots are sibling folders in the ZODB. Both have a Photo Folder called images, that are storing in the filesystem via ExtFile. The problem is that when a photo with a non-yet generated display is being called through the virtual url, the corresponding image is created in the filesystem as if the topmost folder was the virtual root of the site (namely $INSTANCE_HOME/var/photos/). If I call this photo through the real (non virtual) url, this topmost folder matches the ZODB root. For example, if I call these real urls: - http://zopeserver.com:8080/sites/site1/images/image.jpg?display=whatever - http://zopeserver.com:8080/sites/site2/images/image.jpg?display=whatever in the filesystem I would have something like: - $INSTANCE_HOME/var/photos/sites/site1/images/image.jpg/image_whatever.jpg - $INSTANCE_HOME/var/photos/sites/site1/images/image.jpg/image_whatever.jpg but if I call the same via the virtual url: - http://www.virtualsite1.com/images/image.jpg?display=whatever - http://www.virtualsite2.com/images/image.jpg?display=whatever I only get: $INSTANCE_HOME/var/photos/images/image.jpg/image_whatever.jpg both paths point to the same file! I think you understand why this worries me. Any hint would be greatly appreciated. Thanks, Pablo Relevant software installed: Linux Fedora Core 3 Zope: 2.9.4 Python: 2.4.3 ExtFile: 1.5.0-beta1 Photo: 1.3.1 PS: and BTW, the Zipupload feature in Photo Folder fails miserably for some reason. ___ 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] Re: (microsoft) webdav and zope 2.8.4
First, I am getting emails in the digest mode so apologies to everyone if this has been already discussed after I got the last issue, about five hours ago. I also need to have the webdav server working for MS. If somebody sent patches or links to them (other than the one I quoted below) I missed them completely. But more important than that, I would like to know if these patches had already been merged to later versions of Zope (I'm also using 2.8.4), or if there are plans for doing so. Thanks, Pablo You're right, I've copied/pasted the same patch twice, sorry ! I use both the Ressource.py and Collection.py patches to make O2K3 happy. Regards, Patrick. On 3/3/06, Einar Næss Jensen [EMAIL PROTECTED] wrote: -- Forwarded message -- From: Einar Næss Jensen [EMAIL PROTECTED] Date: Mar 3, 2006 9:10 AM Subject: Re: [Zope] Re: (microsoft) webdav and zope 2.8.4 To: Patrick Decat [EMAIL PROTECTED] On 3/2/06, Patrick Decat [EMAIL PROTECTED] wrote: Then the following to Resource.py : bash-3.00$ diff -c Resource.py Resource.py-patched *** Resource.py Thu Mar 2 16:37:27 2006 --- Resource.py-patched Thu Mar 2 16:37:25 2006 *** *** 71,76 --- 71,77 if not hasattr(response, '_server_version'): response.setHeader('Connection', 'close') response.setHeader('Date', rfc1123_date(), 1) + response.setHeader('MS-Author-Via', 'DAV') # HTTP Range support if HTTPRangeInterface.isImplementedBy(self): Works for me with Office 2003 products. I think the correct is collection.py, and the missing line is line nr47. at least it worked for me after that. ___ 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] Software to Administer a Zope Project?
Hi everybody, I want to keep track of a project I am developing in Zope, so basically I need some advise on the software I might prefer to adopt. I tried trac, but I find it a bit complicated to have to admin everything through the shell and also, unless there's an easy way to integrate zodb stuff to it, I'm not interested in the svn part, just the project management itself (tickets, milestones, etc). I'm not saying that I won't use Trac, but maybe I'm just missing something. Zepp is not an option. Thanks in advance, Pablo ___ 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] Problem with multiple Browser Id Managers
Dieter Maurer wrote: Pablo Ziliani wrote at 2005-11-18 20:37 -0300: ... using the same session data container by various session data managers ... However now my question is: can't this configuration lead to session collisions, given that now I have multiple BIMs/SDMs making writes to the same TrOC? (...) Even a single browser id manager does not explicitely protect itself from handing out the same browser id twice. But the probability is very low indeed: the session id consists of a time stamp (second resolution, I think) and a 4 byte (pseudo) random number. (...) *BUT* not sure whether the (pseudo) random number generator behaves well in the presence of multiple threads accessing it concurrently. It may well be that it delivers the same number for different threads accessing it concurrently which *MUCH* higher probability as one would expect... (...) Ok, this sounds fairly safe to me. Besides, my sites aren't that heavily loaded yet and I'm actually keeping the installation's default number of threads (4). Again, thanks a lot, Dieter. Pablo ___ 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] Problem with multiple Browser Id Managers
Thanks Chris and Dieter for your feedback, please see my notes below. Chris McDonough wrote: On Thu, 2005-11-17 at 22:47 -0300, Pablo Ziliani wrote: since first (as I said) I had no trouble in adding another deeper BMI; and second, because any attempt to delete root's BMI ends in a /browser_id_manager/ cannot be deleted. page error message. Any hint? I suspect it's a bug that the root browser id manager cannot be deleted. That said, it shouldn't be necessary to delete it, as the session data manager will use the first bid manager it finds in its acquisition path to get the browser id (see Products/Sessions/SessionDataManager.py). In your case, probably what's happening is that the machinery is finding the /session_data_manager object at the root, and the first bid manager in *its* acquisition path is the root /browser_id_manager. If you also create a 'session_data_manager' object in your site, this one should be found and it should use its peer 'browser_id_manager' object. This area is somewhat murky as it's unusual to need multiple browser id managers per server, so I'll be interested to know if creating a session data manager fixes this problem. - C Adding the new session_data_manager did the trick as you both suggested, THANKS! However, my first attempt was unsuccessful as upon creation I had set it to use an non-existing Transient Object Container (TrOC) under /temp_folder, in hope that this would create it at the same time. Yes, I know how easily I come to complicate things, but my hope was actually real: I did got both objects created... until I restarted Zope of course, where (consistently with its container function) I lost the new TrOC forever. I can see in OFS/Application.py that both the temp_folder and the default Transient OC are recreated on startup, so I guess that the only way to get a permanent TrOC is by monkey patching Zope, what of course is beyond my needs, given that I can use (as I finally did) the default TrOC. However now my question is: can't this configuration lead to session collisions, given that now I have multiple BIMs/SDMs making writes to the same TrOC? Thanks in advance for your advise, Pablo ___ 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 multiple Browser Id Managers
Hello all, I have a situation here; as I has previously posted, I need to set the domain/host for of the cookie that stores the session id so it is shared among multiple subdomains. As Dieter has pointed to me, I should change the 'domain' property for the Browser Id Manager (from now on BMI) that controls the session. Unfortunately, my Zope instance holds multiples virtual sites, so I can't simply change the root BMI that comes with Zope's installation; instead I need to create inner BMI instances. So I did, giving the new instance a different Browser Id Name than the root's _ZopeId both to differentiate them and to be more site-specific. Then I restarted Zope (don't know if this really matters) and re-entered the site to see what happened: I was still given the same cookie, _ZopeId. Reading the documentation I found this quote (browser-add.stx): Instantiating Multiple Browser Id Managers (Optional) (...) In its default configuration, Zope will not allow you to create a browser id manager if one is installed in the root or in a place where the new browser id manager can acquire the original browser id manager via its containment path (for programmers: the session id manager's class' Zope __replaceable__ property is set to UNIQUE). This means, practically, that if you wish to have multiple browser id managers, you need to carefully delete the root browser id manager, then you need to place additional browser id managers in the most deeply-nested containers first, working your way out towards the root, finally replacing the root browser id manager if desired. ...which is either false or (more likely), outdated, since first (as I said) I had no trouble in adding another deeper BMI; and second, because any attempt to delete root's BMI ends in a /browser_id_manager/ cannot be deleted. page error message. Any hint? Thanks all in advance, Pablo Ziliani ___ 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] Setting a session's domain
Hi all, I'm developing a site that has multiple subdomains (i.e.: http://atlanta.website.com, http://nyc.website.com, etc.). Can anybody point me how can I get the session to be shared across these different subdomains? Unless someone can give me an opposite advise, I think I need to specify a domain to the cookie which is trivial for regular cookies but I just can't find how to do it with sessions (notice that I am I'm using Zope's regular request.SESSION). Thanks in advance, Pablo ___ 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] Setting a session's domain
Jonathan wrote: Hi all, I'm developing a site that has multiple subdomains (i.e.: http://atlanta.website.com, http://nyc.website.com, etc.). Can anybody point me how can I get the session to be shared across these different subdomains? Unless someone can give me an opposite advise, I think I need to specify a domain to the cookie which is trivial for regular cookies but I just can't find how to do it with sessions (notice that I am I'm using Zope's regular request.SESSION). How about creating subfolders, one for each subdomain, and then use URL rewriting to point to the required subfolder. The top level folder would contain your login/authenication/session info which could be accessed via acquisition. Hello Jonathan and thanks for your help, Actually, the site is working. I have something close to what you said with the difference that I am getting the rewritings go to the same folder. Unfortunately this doesn't work because of the way that session's cookies are served by default in Zope (including the subdomain). In other words, no matter how you construct your internal folder hierarchy, browsers won't submit a session cookie from a subdomain to another. Cookies specification define a keyword to set the domain from which the cookie should be submitted, but I don't know how to set it for Zope's default session. Or if I'm completely missing something. Thanks, Pablo ___ 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] Setting a session's domain
Dieter Maurer wrote: Pablo Ziliani wrote at 2005-11-15 10:15 -0300: I'm developing a site that has multiple subdomains (i.e.: http://atlanta.website.com, http://nyc.website.com, etc.). Can anybody point me how can I get the session to be shared across these different subdomains? Unless someone can give me an opposite advise, I think I need to specify a domain to the cookie which is trivial for regular cookies but I just can't find how to do it with sessions (notice that I am I'm using Zope's regular request.SESSION). The Browser Id Manager (browser_id_manager in your Zope Root Folder) is responsible for the session cookies. It has a configuration option to choose the cookie domain. YES! that's the one I was looking for (I can't believe that I haven't seen it before). Thanks a lot Dieter, Pablo ___ 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 permissions in 2.8.4
Hello, I am having a very tough time with permissions after I have upgraded to 2.8.4 from 2.8.1, and I would really appreciate some help as I have exhausted my imagination trying to figure what's wrong. I have the following structure in my zope instance: zope root | sites || admin || website Inside the folder admin I have some templates using a macro named page in a sibling template. The folder sites has some checks marked in the security tab, but this is supposed to be ineffective since all the permissions are also acquiring from the root folder. The folder admin has the default permissions but for the View and Access Content Information, which I only made available for Managers and some other irrelevant roles. Pages inside admin (i.e.: users.html) have additional security configurations, but in all cases Managers are explicitly allowed. The website folder is the virtual domain, so when I call http://mywebsite.com/admin I am in fact acquiring the folder from above the site root (website). However, this doesn't seem to be the problem: the same occurs if I move admin inside website. My user is defined in the zope root and although there's another acl_folder in sites there's no user there with my same id. The odd thing is that if I (also) check all the Acquire permissions settings checkbox in admin, I will be able to access the macro but then the macro page won't be able to access some methods i.e.template/title_or_id. I think this should not happen, Managers are always (explicitly!) allowed all along the path from the root to each page. As said, this was working fine in 2.8.1. Any help or hint would be greatly appreciated, TIA, Pablo PS: this is the traceback: Request URL http://mywebsite.com/admin/users.html Exception Type Unauthorized Exception Value Not authorized to access binding: context Traceback (innermost last): * Module ZPublisher.Publish, line 113, in publish * Module ZPublisher.mapply, line 88, in mapply * Module ZPublisher.Publish, line 40, in call_object * Module Shared.DC.Scripts.Bindings, line 311, in __call__ * Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec * Module Products.PageTemplates.ZopePageTemplate, line 256, in _exec * Module Products.PageTemplates.PageTemplate, line 104, in pt_render ZopePageTemplate at /sites/admin/users.html * Module TAL.TALInterpreter, line 206, in __call__ * Module TAL.TALInterpreter, line 250, in interpret * Module TAL.TALInterpreter, line 697, in do_useMacro * Module Products.PageTemplates.TALES, line 221, in evaluate URL: /sites/admin/users.html Line 4, Column 0 Expression: standard:'here/template_admin.html/macros/page' Names: {'container': UnauthorizedBinding: container, 'context': UnauthorizedBinding: context, 'default': Products.PageTemplates.TALES.Default instance at 0xb7516c4c, 'here': UnauthorizedBinding: context, 'loop': Products.PageTemplates.TALES.SafeMapping object at 0xb3ee062c, 'modules': Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0xb7528b4c, 'nothing': None, 'options': {'args': ()}, 'repeat': Products.PageTemplates.TALES.SafeMapping object at 0xb3ee062c, 'request': HTTPRequest, URL=http://mywebsite.com/admin/users.html, 'root': Application at , 'template': ZopePageTemplate at /sites/admin/users.html, 'traverse_subpath': [], 'user': pablo} * Module Products.PageTemplates.Expressions, line 185, in __call__ * Module Products.PageTemplates.Expressions, line 173, in _eval * Module Products.PageTemplates.Expressions, line 127, in _eval __traceback_info__: here * Module Products.PageTemplates.Expressions, line 284, in restrictedTraverse __traceback_info__: {'path': ['template_admin.html', 'macros', 'page'], 'TraversalRequestNameStack': ['page', 'macros']} * Module Shared.DC.Scripts.Bindings, line 180, in __getattr__ * Module Shared.DC.Scripts.Bindings, line 187, in __you_lose Unauthorized: Not authorized to access binding: context ___ 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] Re: Problem with permissions in 2.8.4 (resolved)
Replying to my own post as I just found the answer to my problem (which had nothing to do with the version of zope). The problem was that when I mass-imported some folders to the new instance, I didn't check to retain the ownership information; thus the templates where executed whith the credentials of the Anonymous role. Sorry for bothering, I hope someone finds this post usefull in the future, Pablo PS: setting the verbose-security on was of great help in order to address this issue Pablo Ziliani wrote: Hello, I am having a very tough time with permissions after I have upgraded to 2.8.4 from 2.8.1, and I would really appreciate some help as I have exhausted my imagination trying to figure what's wrong. I have the following structure in my zope instance: zope root | sites || admin || website Inside the folder admin I have some templates using a macro named page in a sibling template. The folder sites has some checks marked in the security tab, but this is supposed to be ineffective since all the permissions are also acquiring from the root folder. The folder admin has the default permissions but for the View and Access Content Information, which I only made available for Managers and some other irrelevant roles. Pages inside admin (i.e.: users.html) have additional security configurations, but in all cases Managers are explicitly allowed. The website folder is the virtual domain, so when I call http://mywebsite.com/admin I am in fact acquiring the folder from above the site root (website). However, this doesn't seem to be the problem: the same occurs if I move admin inside website. My user is defined in the zope root and although there's another acl_folder in sites there's no user there with my same id. The odd thing is that if I (also) check all the Acquire permissions settings checkbox in admin, I will be able to access the macro but then the macro page won't be able to access some methods i.e.template/title_or_id. I think this should not happen, Managers are always (explicitly!) allowed all along the path from the root to each page. As said, this was working fine in 2.8.1. Any help or hint would be greatly appreciated, TIA, Pablo PS: this is the traceback: Request URL http://mywebsite.com/admin/users.html Exception Type Unauthorized Exception Value Not authorized to access binding: context Traceback (innermost last): * Module ZPublisher.Publish, line 113, in publish * Module ZPublisher.mapply, line 88, in mapply * Module ZPublisher.Publish, line 40, in call_object * Module Shared.DC.Scripts.Bindings, line 311, in __call__ * Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec * Module Products.PageTemplates.ZopePageTemplate, line 256, in _exec * Module Products.PageTemplates.PageTemplate, line 104, in pt_render ZopePageTemplate at /sites/admin/users.html * Module TAL.TALInterpreter, line 206, in __call__ * Module TAL.TALInterpreter, line 250, in interpret * Module TAL.TALInterpreter, line 697, in do_useMacro * Module Products.PageTemplates.TALES, line 221, in evaluate URL: /sites/admin/users.html Line 4, Column 0 Expression: standard:'here/template_admin.html/macros/page' Names: {'container': UnauthorizedBinding: container, 'context': UnauthorizedBinding: context, 'default': Products.PageTemplates.TALES.Default instance at 0xb7516c4c, 'here': UnauthorizedBinding: context, 'loop': Products.PageTemplates.TALES.SafeMapping object at 0xb3ee062c, 'modules': Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0xb7528b4c, 'nothing': None, 'options': {'args': ()}, 'repeat': Products.PageTemplates.TALES.SafeMapping object at 0xb3ee062c, 'request': HTTPRequest, URL=http://mywebsite.com/admin/users.html, 'root': Application at , 'template': ZopePageTemplate at /sites/admin/users.html, 'traverse_subpath': [], 'user': pablo} * Module Products.PageTemplates.Expressions, line 185, in __call__ * Module Products.PageTemplates.Expressions, line 173, in _eval * Module Products.PageTemplates.Expressions, line 127, in _eval __traceback_info__: here * Module Products.PageTemplates.Expressions, line 284, in restrictedTraverse __traceback_info__: {'path': ['template_admin.html', 'macros', 'page'], 'TraversalRequestNameStack': ['page', 'macros']} * Module Shared.DC.Scripts.Bindings, line 180, in __getattr__ * Module Shared.DC.Scripts.Bindings, line 187, in __you_lose Unauthorized: Not authorized to access binding: context ___ 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] Testing arguments in zsql methods
Hi everyone, I have what I think is a banal question here... Is there any way I can test inside a zsql method if an argument has been passed? dtml-if foo won't work because 0 (zero) is an expected value. Have tried dtml-if _.hasattr(_, 'foo') but it seems to be always false (where's that namespace?) TIA, Pablo ___ 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] Re: Testing arguments in zsql methods
Hi again, for the records, replying my own recent post: the way to test if a variable exists in a zsql method is through has_key NOT hasattr. In other words: dtml-if _.has_key('foo').../dtml-if Sorry for bothering, it's been a long time not dealing with dtml Pablo Pablo Ziliani wrote: Hi everyone, I have what I think is a banal question here... Is there any way I can test inside a zsql method if an argument has been passed? dtml-if foo won't work because 0 (zero) is an expected value. Have tried dtml-if _.hasattr(_, 'foo') but it seems to be always false (where's that namespace?) TIA, Pablo ___ 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 )