[Zope3-checkins] CVS: Zope3/src/zope/security - checker.py:1.14
Barry Warsaw
barry@zope.com
Tue, 15 Apr 2003 17:23:48 -0400
Update of /cvs-repository/Zope3/src/zope/security
In directory cvs.zope.org:/tmp/cvs-serv27018/src/zope/security
Modified Files:
checker.py
Log Message:
BasicTypes: Do not proxy zope.i18n.messageid.MessageID objects.
I'm not sure this is the 100% right thing to do, but it makes
TAL/PageTemplates work. Otherwise we'd have to unwrap them to do
isinstance tests in zope/tales/tales.py, Context.evaluateText() and
that didn't seem like the right thing either.
Also, add ZPL header and re-organize imports.
=== Zope3/src/zope/security/checker.py 1.13 => 1.14 ===
--- Zope3/src/zope/security/checker.py:1.13 Sun Apr 13 13:25:19 2003
+++ Zope3/src/zope/security/checker.py Tue Apr 15 17:23:47 2003
@@ -1,3 +1,26 @@
+##############################################################################
+#
+# Copyright (c) 2003 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""
+$Id$
+"""
+
+import os
+import sys
+import types
+import datetime
+
+from zope.i18n.messageid import MessageID
from zope.security.interfaces import IChecker
from zope.exceptions \
import Unauthorized, ForbiddenAttribute, Forbidden, DuplicationError
@@ -6,8 +29,6 @@
from zope.security._proxy import _Proxy as Proxy
from zope.security.interfaces import ISecurityProxyFactory
from zope.security.management import getSecurityManager
-import sys, os, types
-import datetime
if os.environ.get('ZOPE_WATCH_CHECKERS'):
WATCH_CHECKERS = True
@@ -368,6 +389,7 @@
types.NoneType: NoProxy,
str: NoProxy,
unicode: NoProxy,
+ MessageID: NoProxy,
type(True): NoProxy, # Boolean, if available :)
datetime.timedelta: NoProxy,
datetime.datetime: NoProxy,