[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/Security - _protections.py:1.3 configure.zcml:1.4

Jim Fulton jim@zope.com
Tue, 19 Nov 2002 18:25:45 -0500


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

Modified Files:
	_protections.py configure.zcml 
Log Message:

Two changes that were far reaching and interdependent.

- Changed existing directives that mention interfaces to register
  those interfaces with the global interface service.

- Moved all configuration support (except that in Zope.Configuration)
  into Zope.App. This was necessary to get the order of execution such
  that the interface service was defined before directives that used
  interfaces were used.  This is a change that has been needed for
  some time.



=== Zope3/lib/python/Zope/App/Security/_protections.py 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/App/Security/_protections.py:1.2	Mon Jun 10 19:28:16 2002
+++ Zope3/lib/python/Zope/App/Security/_protections.py	Tue Nov 19 18:25:14 2002
@@ -51,5 +51,22 @@
     for which in 'OO', 'II', 'OI', 'IO':
         _protect(which)
 
+    from Persistence.PersistentList import PersistentList
+
+    defineChecker(PersistentList,
+                  NamesChecker(
+                     ['__getitem__', '__getslice__', '__len__', '__iter__',
+                      '__contains__', 'index', 'count'])
+                  )
+
+    from Persistence.PersistentDict import PersistentDict
+
+    defineChecker(PersistentDict,
+                  NamesChecker(['__getitem__', '__len__', '__iter__',
+                        'get', 'has_key', '__copy__',
+                        'keys', 'values', 'items',
+                        'iterkeys', 'iteritems', 'itervalues', '__contains__',
+                        ]
+                     )
+                  )
     
-                      


=== Zope3/lib/python/Zope/App/Security/configure.zcml 1.3 => 1.4 ===
--- Zope3/lib/python/Zope/App/Security/configure.zcml:1.3	Thu Jun 20 16:00:27 2002
+++ Zope3/lib/python/Zope/App/Security/configure.zcml	Tue Nov 19 18:25:14 2002
@@ -4,6 +4,45 @@
    >
 
   <include package=".Registries" />
+
+  <!-- Standard Permissions -->
+
+  <permission id="Zope.View"
+                       title="View"
+                       />
+
+  <permission id="Zope.Security"
+                       title="Change security settings"
+                       />
+
+  <permission id="Zope.ManageContent" 
+                       title="Manage Content"
+                       />
+
+  <permission id="Zope.ManageBindings" 
+                       title="Manage Service Bindings"
+                       />
+
+  <permission id="Zope.ManageCode" 
+                       title="Manage Code"
+                       description="Manage executable code, including
+                                    Python, SQL, ZPT, etc."
+                        />
+
+  <permission id="Zope.ManageServices" 
+                       title="Manage Services"
+                        />
+
+  <!-- XXX What is this for? -->
+  <permission id="Zope.ManageApplication" 
+                       title="Manage Application"
+                       />
+
+  <!-- XXX What is this for? -->
+  <permission id="Zope.I18n" 
+                       title="Use Internationalization (?XXX)"
+                       />
+
   <include package=".Grants" />
 
   <securityPolicy 
@@ -12,10 +51,6 @@
   <adapter factory="Zope.App.Security.BasicAuthAdapter."
            provides="Zope.App.Security.ILoginPassword."
            for="Zope.Publisher.HTTP.IHTTPCredentials." />
-
-  <adapter factory="Zope.App.Security.BasicVFSAuthAdapter."
-           provides="Zope.App.Security.ILoginPassword."
-           for="Zope.Publisher.VFS.IVFSCredentials." />
 
   <adapter factory="Zope.App.Security.BasicVFSAuthAdapter."
            provides="Zope.App.Security.ILoginPassword."