Re: [Zope-dev] PAS CookieAuthHelper and insufficient privileges

2010-10-12 Thread Wichert Akkerman
On 10/12/10 02:21 , Laurence Rowe wrote:
 I'm currently implementing single sign on across Plone sites but have
 run into a bit of an issue with the CookieAuthHelper.

 Unauthorized accesses are redirected to its login_path attribute even
 when a user is already logged in. Plone works around this with a
 require_login script that traverses to insufficient_privileges (rather
 than login_form) when the user is not anonymous.
 http://dev.plone.org/plone/browser/Plone/trunk/Products/CMFPlone/skins/plone_login/require_login.py

The result is still nasty since it means the unauthorized error will 
always consider the user to be unauthenticated. I've implemented a 
workaround in NuPlone to fix that, see 
http://svn.plone.org/svn/collective/NuPlone/trunk/plonetheme/nuplone/skin/error.py
 
. Perhaps something based on that will work for you as well.

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


Re: [Zope-dev] Developer meeting TODAY at 15:00 UTC

2010-10-12 Thread Christian Theune
Gah. Editing old posts ... :)


-- 
Christian Theune · c...@gocept.com
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Zope Tests: 35 OK, 6 Failed

2010-10-12 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Mon Oct 11 12:00:00 2010 UTC to Tue Oct 12 12:00:00 2010 UTC.
There were 41 messages: 6 from Zope Tests, 4 from buildbot at pov.lt, 20 from 
buildbot at winbot.zope.org, 11 from ccomb at free.fr.


Test failures
-

Subject: FAILED : winbot / ztk_dev py_254_win32
From: buildbot at winbot.zope.org
Date: Mon Oct 11 16:18:54 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021385.html

Subject: FAILED : winbot / ztk_dev py_265_win32
From: buildbot at winbot.zope.org
Date: Mon Oct 11 16:27:27 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021386.html

Subject: FAILED : winbot / ztk_dev py_265_win64
From: buildbot at winbot.zope.org
Date: Mon Oct 11 16:36:25 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021387.html

Subject: FAILED : winbot / ztk_dev py_270_win32
From: buildbot at winbot.zope.org
Date: Mon Oct 11 16:44:46 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021388.html

Subject: FAILED : winbot / ztk_dev py_270_win64
From: buildbot at winbot.zope.org
Date: Mon Oct 11 16:53:47 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021389.html

Subject: FAILED : winbot / zc_buildout_dev py_244_win32
From: buildbot at winbot.zope.org
Date: Mon Oct 11 17:39:53 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021394.html


Tests passed OK
---

Subject: OK : winbot / ztk_10 py_244_win32
From: buildbot at winbot.zope.org
Date: Mon Oct 11 17:04:09 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021390.html

Subject: OK : winbot / ztk_10 py_254_win32
From: buildbot at winbot.zope.org
Date: Mon Oct 11 17:12:29 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021391.html

Subject: OK : winbot / ztk_10 py_265_win32
From: buildbot at winbot.zope.org
Date: Mon Oct 11 17:20:24 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021392.html

Subject: OK : winbot / ztk_10 py_265_win64
From: buildbot at winbot.zope.org
Date: Mon Oct 11 17:28:25 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021393.html

Subject: OK : winbot / zc_buildout_dev py_254_win32
From: buildbot at winbot.zope.org
Date: Mon Oct 11 17:51:41 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021395.html

Subject: OK : winbot / zc_buildout_dev py_265_win32
From: buildbot at winbot.zope.org
Date: Mon Oct 11 18:04:35 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021396.html

Subject: OK : winbot / zc_buildout_dev py_265_win64
From: buildbot at winbot.zope.org
Date: Mon Oct 11 18:16:52 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021397.html

Subject: OK : winbot / zc_buildout_dev py_270_win32
From: buildbot at winbot.zope.org
Date: Mon Oct 11 18:29:46 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021398.html

Subject: OK : winbot / zc_buildout_dev py_270_win64
From: buildbot at winbot.zope.org
Date: Mon Oct 11 18:42:25 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021399.html

Subject: OK : winbot / ZODB_dev py_254_win32
From: buildbot at winbot.zope.org
Date: Mon Oct 11 19:38:58 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021400.html

Subject: OK : ZTK 1.0 / Python2.4.6 Linux 64bit
From: ccomb at free.fr
Date: Mon Oct 11 19:42:47 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021401.html

Subject: OK : ZTK 1.0 / Python2.6.5 Linux 64bit
From: ccomb at free.fr
Date: Mon Oct 11 19:43:14 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021402.html

Subject: OK : ZTK 1.0 / Python2.5.5 Linux 64bit
From: ccomb at free.fr
Date: Mon Oct 11 19:43:22 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021403.html

Subject: OK : winbot / ZODB_dev py_265_win32
From: buildbot at winbot.zope.org
Date: Mon Oct 11 20:35:17 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021404.html

Subject: OK : Zope 3.4 Known Good Set / py2.4-64bit-linux
From: buildbot at pov.lt
Date: Mon Oct 11 21:11:20 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021405.html

Subject: OK : Zope-2.10 Python-2.4.6 : Linux
From: Zope Tests
Date: Mon Oct 11 21:30:45 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021406.html

Subject: OK : winbot / ZODB_dev py_265_win64
From: buildbot at winbot.zope.org
Date: Mon Oct 11 21:31:39 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021407.html

Subject: OK : Zope-2.11 Python-2.4.6 : Linux
From: Zope Tests
Date: Mon Oct 11 21:32:45 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021408.html

Subject: OK : Zope-2.12 Python-2.6.5 : Linux
From: Zope Tests
Date: Mon Oct 11 21:34:45 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021409.html

Subject: OK : 

Re: [Zope-dev] Developer meeting TODAY at 15:00 UTC

2010-10-12 Thread Adam GROSZER
Hello Christian,

I guess pushing a lot harder on goals... 'cause nothing seems to happen.
Unless I miss something.

Tuesday, October 12, 2010, 1:22:31 PM, you wrote:

CT Gah. Editing old posts ... :)




-- 
Best regards,
 Adam GROSZERmailto:agros...@gmail.com
--
Quote of the day:
That which we call sin in others is experiment for us. 
- Ralph Waldo Emerson 

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


Re: [Zope-dev] PAS CookieAuthHelper and insufficient privileges

2010-10-12 Thread Laurence Rowe
On 12 October 2010 08:39, Wichert Akkerman wich...@wiggy.net wrote:
 On 10/12/10 02:21 , Laurence Rowe wrote:

 I'm currently implementing single sign on across Plone sites but have
 run into a bit of an issue with the CookieAuthHelper.

 Unauthorized accesses are redirected to its login_path attribute even
 when a user is already logged in. Plone works around this with a
 require_login script that traverses to insufficient_privileges (rather
 than login_form) when the user is not anonymous.

 http://dev.plone.org/plone/browser/Plone/trunk/Products/CMFPlone/skins/plone_login/require_login.py

 The result is still nasty since it means the unauthorized error will always
 consider the user to be unauthenticated. I've implemented a workaround in
 NuPlone to fix that, see
 http://svn.plone.org/svn/collective/NuPlone/trunk/plonetheme/nuplone/skin/error.py
 . Perhaps something based on that will work for you as well.

That doesn't seem to be the case when I dropped a pdb into
CookieAuthHelper.unauthorized:

 /data/devel/plone/4.1/src/Products.PluggableAuthService/Products/PluggableAuthService/plugins/CookieAuthHelper.py(184)unauthorized()
- import pdb; pdb.set_trace()
(Pdb) from AccessControl.SecurityManagement import getSecurityManager
(Pdb) getSecurityManager().getUser()
PloneUser 'test1'

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


[Zope-dev] Another weird unicode error from Zope 2

2010-10-12 Thread Chris Withers
Anyone seen this or know what it means?

Traceback (innermost last):
  Module ZPublisher.Publish, line 130, in publish
  Module ZServer.HTTPResponse, line 266, in setBody
  Module ZPublisher.HTTPResponse, line 330, in setBody
  Module ZPublisher.HTTPResponse, line 485, in _encode_unicode
  Module encodings.iso8859_15, line 12, in encode
UnicodeEncodeError: 'charmap' codec can't encode character u'\u203a' in 
position 2439: character maps to undefined

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zc.buildout/buildout.org down - disaster

2010-10-12 Thread Sebastien Douche
On Mon, Oct 11, 2010 at 10:50, Andreas Jung li...@zopyx.com wrote:
 Hi there,

Hi Andreas !

 Second: how to fix this finally?

I know it's not you want hear but build an internal infrastructure
was a great improvement for us. Here, all is internal (debian mirror,
zope mirror, pypi mirror, internal pypi...) and we don't care if a
server is down. For me, the right solution is to make easier internal
server (btw thanks the new bootstrap)




-- 
Sebastien Douche sdou...@gmail.com
Twitter: http://bit.ly/afkrK (agile, lean, python, open source)
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Another weird unicode error from Zope 2

2010-10-12 Thread Charlie Clark
Am 12.10.2010, 16:51 Uhr, schrieb Chris Withers ch...@simplistix.co.uk:

 UnicodeEncodeError: 'charmap' codec can't encode character u'\u203a' in
 position 2439: character maps to undefined

Hi Chris,

according to http://wiki.python.org/moin/UnicodeEncodeError this is what  
you get when you try and encode a unicode codepoint to a charset which  
cannot represent it. The error message appears to depend upon the charset:


 u'\u203a'.encode(iso-8859-15)
Traceback (most recent call last):
   File stdin, line 1, in module
   File  
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/encodings/iso8859_15.py,
  
line 12, in encode
 return codecs.charmap_encode(input,errors,encoding_table)
UnicodeEncodeError: 'charmap' codec can't encode character u'\u203a' in  
position 0: character maps to undefined
 u'\u203a'.encode(latin-1)
Traceback (most recent call last):
   File stdin, line 1, in module
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u203a' in  
position 0: ordinal not in range(256)

ISO-8859-15 is, of course, Latin-1 + the €

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting  Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zc.buildout/buildout.org down - disaster

2010-10-12 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sebastien Douche wrote:
 On Mon, Oct 11, 2010 at 10:50, Andreas Jung li...@zopyx.com wrote:
 Hi there,
 
 Hi Andreas !
 
 Second: how to fix this finally?
 
 I know it's not you want hear but build an internal infrastructure
 was a great improvement for us. Here, all is internal (debian mirror,
 zope mirror, pypi mirror, internal pypi...) and we don't care if a
 server is down. For me, the right solution is to make easier internal
 server (btw thanks the new bootstrap)


sorry - wrong answer. This is a stupid misbehavior of setuptools
or zc.buildout. The zc.buildout package are hosted on PyPI and PyPI
was available. There is no reason for whatever component
to connect to buildout.org and fail without taking PyPI into account.

Andreas
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJMtHguAAoJEADcfz7u4AZjbTsLvjCO5Zp+DS2c5AMDU7jH2+zL
DdOeADxlQlfWssetg9pur0uFc6zIOf8KvX4cJgfH9y6ZnGMB/vj3BIb9LBV6Hk0c
EgwVCovJyBjBi+lcdsWJG6+1VY94rj0VMjY0QYOkGmo1c1rSwNfRA6MTwrN7epnR
2+6bLBn75YHvl6OLEXowo9ayZ4l5Ii2daXEp4zKMQHFOqr1RjCHHMynaGU/OQWso
aZZdrWHRcpYaJKR7LOicfmM9GMHsC3T88PGMDHa5KcSbBF8ZzK+eiOWJ8si1lRHM
t4LVtqNGX7qFeXN3OSAXoBl3tsvkqir0LHgawqAPX4mIfPoL8QCwwGiZAhKFFl74
EfccjHAORQB7VAqIMpvgxvi6oWP9zNLH5myueNA0MbgJIPVWU9tzpXx5CD5orCsY
ck/eghHcbyTNbY1MXqwNhhNRWJUMIZ6nLeW09Wj6qpV4eNY1VTix/mobaWCuiWNt
Qzv+15mDgNmZiK5Xr/dV8HTPj8zTJ/s=
=lcRy
-END PGP SIGNATURE-
attachment: lists.vcf___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zc.buildout/buildout.org down - disaster

2010-10-12 Thread Hanno Schlichting
On Tue, Oct 12, 2010 at 5:01 PM, Andreas Jung li...@zopyx.com wrote:
 sorry - wrong answer. This is a stupid misbehavior of setuptools
 or zc.buildout. The zc.buildout package are hosted on PyPI and PyPI
 was available. There is no reason for whatever component
 to connect to buildout.org and fail without taking PyPI into account.

Are you sure you used the latest distribute release? I hadn't had any
problem at all during that whole time.

It sounds like 0.6.13 should help here which includes:

Issue 163: scan index links before external links

In general distribute should behave better, as we have since 0.6.7:

Issue 21: Allow PackageIndex.open_url to gracefully handle all cases
of a httplib.HTTPException instead of just InvalidURL and
BadStatusLine.

Which was the merge of jarn.setuptoolsfixer into the distribute
codebase. That package is obsolete for more than a year now.

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


Re: [Zope-dev] zc.buildout/buildout.org down - disaster

2010-10-12 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hanno Schlichting wrote:
 On Tue, Oct 12, 2010 at 5:01 PM, Andreas Jung li...@zopyx.com wrote:
 sorry - wrong answer. This is a stupid misbehavior of setuptools
 or zc.buildout. The zc.buildout package are hosted on PyPI and PyPI
 was available. There is no reason for whatever component
 to connect to buildout.org and fail without taking PyPI into account.
 
 Are you sure you used the latest distribute release? I hadn't had any
 problem at all during that whole time.

This was a Plone 4.0.1 buildout so I guess it was 0.6.14
(can't check right now). Also numerous people complained
on IRC having the same problem (at least related to Plone 4
buildouts - not sure about problems with Plone 3 buildouts)


 It sounds like 0.6.13 should help here which includes:

 
 Which was the merge of jarn.setuptoolsfixer into the distribute
 codebase. That package is obsolete for more than a year now.

Well - obviously there is likely still something wrong
(in Distribute).

But waitthis problem persisted even after releasing
zc.buildout 1.5.2 (with 'url' pointing to pypi.python.org).
So there must be something else.

Wild guess:

pypi.python.org/simple/zc.buildout

contains a file

1.5.0 home_page

file pointing to buildout.org

Perhaps there is some unhandled edgecase in Distribute?
No idea - I don#t have much insight in setuptools/Distribute.

Andreas
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJMtHzMAAoJEADcfz7u4AZjlb8LvRxcflhiZF4qRP1PSDmuCIpw
LcxVn+njFDb23ExT+jo4FracyQcHh1q6OdLA0HnI9V2L4PDfcQmraUorLGMIZqWz
qqFIq4UIcrtzZ6CM3MSelT/kUOu/oLoKZr2jkwZQ6CCRTi+F5FLNR6uMptGULHIU
W7HFB7Li8gVr6nLjvatGYXE8BjmdcTwioYG9/EjkngkwcvEdCZUiMJnBqXprgXXw
HgSIXZi3NYVlyMji2/fqj6KsUVsUPdin3d35xu/fkkHeCum/eSLfBLLuL+1Qde/A
uS5Urn93LV36q8KO4cjkd1glE5rkB+GwH5V9hp47xLWhjuv8F7sbfGjQLF/G9BFj
7+0PoXz071ACN8H8xzksoTuN/j0aRyG7raQjF5xOonbbNLiXsd5hn7hRMB9+hRn/
YQWv5OsD/RTJw8zJ/kFjqsytg0cu3nyW4F/2nWhrnYUQ2rRuQGAmi52+ebQl60+1
eMk02nk9brncZzMvXNHF9Yq0ydn+SSc=
=BC/y
-END PGP SIGNATURE-
attachment: lists.vcf___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zc.buildout/buildout.org down - disaster

2010-10-12 Thread Charlie Clark
Am 12.10.2010, 17:12 Uhr, schrieb Hanno Schlichting ha...@hannosch.eu:

 Are you sure you used the latest distribute release? I hadn't had any
 problem at all during that whole time.

I had it here with the CMF buildout and also got it in a report from a  
customer.

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting  Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Fun with vocabularies

2010-10-12 Thread Charlie Clark
Am 07.10.2010, 14:50 Uhr, schrieb Charlie Clark  
charlie.cl...@clark-consulting.eu:

 Thanks for the tip. For a vocabulary it has to provide IBaseVocabulary as
 well, although I guess I can just define a source. Unfortunately I'm
 getting now getting an AssertionError when the widgets are setup but I  
 now
 know where to look.

Just for the archives

def my_source(context):
...
return SimpleVocabulary()
directlyProvides(my_source, IContextSourceBinder)

works fine with

class IMySchema(Interface):

choices=Choice(
source=my_source
)

NB. that you must use source and not vocabulary for this to work.

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting  Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )