[Zope-Checkins] CVS: Zope/lib/python/App - Management.py:1.51 Product.py:1.53

Shane Hathaway shane@digicool.com
Fri, 19 Oct 2001 11:12:56 -0400


Update of /cvs-repository/Zope/lib/python/App
In directory cvs.zope.org:/tmp/cvs-serv23442/lib/python/App

Modified Files:
	Management.py Product.py 
Log Message:
- Merged cAccessControl-review-branch.

- Made some corrections to the DTML tests, which aren't currently working
in testrunner but work when run directly. ??  


=== Zope/lib/python/App/Management.py 1.50 => 1.51 ===
 from Globals import DTMLFile, HTMLFile
 from string import split, join, find
-from AccessControl import getSecurityManager
+from AccessControl import getSecurityManager, Unauthorized
 
 class Tabs(ExtensionClass.Base):
     """Mix-in provides management folder tab support."""
@@ -145,8 +145,8 @@
             m=options[0]['action']
             if m=='manage_workspace': raise TypeError
         except:
-            raise 'Unauthorized', (
-                'You are not authorized to view this object.<p>')
+            raise Unauthorized, (
+                'You are not authorized to view this object.')
 
         if find(m,'/'):
             raise 'Redirect', (


=== Zope/lib/python/App/Product.py 1.52 => 1.53 ===
 from HelpSys.HelpSys import ProductHelp
 import RefreshFuncs
+from AccessControl import Unauthorized
 
 
 class ProductFolder(Folder):
@@ -447,7 +448,7 @@
         Attempts to perform a refresh operation.
         '''
         if self._readRefreshTxt() is None:
-            raise 'Unauthorized', 'refresh.txt not found'
+            raise Unauthorized, 'refresh.txt not found'
         message = None
         if RefreshFuncs.performFullRefresh(self._p_jar, self.id):
             from ZODB import Connection
@@ -463,7 +464,7 @@
         Changes the auto refresh flag for this product.
         '''
         if self._readRefreshTxt() is None:
-            raise 'Unauthorized', 'refresh.txt not created'
+            raise Unauthorized, 'refresh.txt not created'
         RefreshFuncs.enableAutoRefresh(self._p_jar, self.id, enable)
         if enable:
             message = 'Enabled auto refresh.'
@@ -477,7 +478,7 @@
         Selects which products to refresh simultaneously.
         '''
         if self._readRefreshTxt() is None:
-            raise 'Unauthorized', 'refresh.txt not created'
+            raise Unauthorized, 'refresh.txt not created'
         RefreshFuncs.setDependentProducts(self._p_jar, self.id, selections)
         if REQUEST is not None:
             return self.manage_refresh(REQUEST)