[Zope3-checkins] SVN: Zope3/branches/Zope-3.1/src/zope/app/ Merged revisions 37911, 37979 from the trunk:

Dmitry Vasiliev dima at hlabs.spb.ru
Wed Aug 17 09:16:40 EDT 2005


Log message for revision 37980:
  Merged revisions 37911, 37979 from the trunk:
  
      Grant views cleaned up
  

Changed:
  U   Zope3/branches/Zope-3.1/src/zope/app/authentication/authentication.py
  U   Zope3/branches/Zope-3.1/src/zope/app/authentication/browser/schemasearch.py
  U   Zope3/branches/Zope-3.1/src/zope/app/authentication/browser/schemasearch.txt
  U   Zope3/branches/Zope-3.1/src/zope/app/authentication/groupfolder.py
  D   Zope3/branches/Zope-3.1/src/zope/app/securitypolicy/browser/grant.pt

-=-
Modified: Zope3/branches/Zope-3.1/src/zope/app/authentication/authentication.py
===================================================================
--- Zope3/branches/Zope-3.1/src/zope/app/authentication/authentication.py	2005-08-17 11:54:56 UTC (rev 37979)
+++ Zope3/branches/Zope-3.1/src/zope/app/authentication/authentication.py	2005-08-17 13:16:40 UTC (rev 37980)
@@ -15,9 +15,7 @@
 
 $Id$
 """
-from zope.event import notify
 import zope.interface
-import zope.schema
 
 from zope import component
 from zope.schema.interfaces import ISourceQueriables
@@ -28,6 +26,7 @@
 
 from zope.app.authentication import interfaces
 
+
 class PluggableAuthentication(SiteManagementFolder):
 
     zope.interface.implements(
@@ -162,8 +161,12 @@
         ILocation)
 
     def __init__(self, authplugin, pau):
-        self.__parent__ = pau
-        self.__name__ = ''
+        if ILocation.providedBy(authplugin):
+            self.__parent__ = authplugin.__parent__
+            self.__name__ = authplugin.__name__
+        else:
+            self.__parent__ = pau
+            self.__name__ = ""
         self.authplugin = authplugin
         self.pau = pau
         self.schema = authplugin.schema

Modified: Zope3/branches/Zope-3.1/src/zope/app/authentication/browser/schemasearch.py
===================================================================
--- Zope3/branches/Zope-3.1/src/zope/app/authentication/browser/schemasearch.py	2005-08-17 11:54:56 UTC (rev 37979)
+++ Zope3/branches/Zope-3.1/src/zope/app/authentication/browser/schemasearch.py	2005-08-17 13:16:40 UTC (rev 37980)
@@ -44,13 +44,13 @@
         sourcepath = getPath(self.context)
         setUpWidgets(self, schema, IInputWidget, prefix=name+'.field')
         html = []
-        
+
         # add sub title for source search field
         html.append('<h4>%s</h4>' % sourcename)
-        
+
         # start row for path display field
         html.append('<div class="row">')
-        
+
         # for each source add path of source
         html.append('  <div class="label">')
         label = translate(source_label, context=self.request)
@@ -61,16 +61,15 @@
         html.append('  </div>')
         html.append('  <div class="field">')
         html.append('      %s' % sourcepath)
-        html.append('    </field>')
         html.append('  </div>')
         html.append('</div>')
-        
+
         # start row for search fields
         html.append('<div class="row">')
 
         for field_name, field in getFieldsInOrder(schema):
             widget = getattr(self, field_name+'_widget')
-            
+
             # for each field add label...
             html.append('  <div class="label">')
             html.append('    <label for="%s" title="%s">'
@@ -78,7 +77,7 @@
             html.append('      %s' % widget.label)
             html.append('    </label>')
             html.append('  </div>')
-            
+
             # ...and field widget
             html.append('  <div class="field">')
             html.append('    %s' % widget())

Modified: Zope3/branches/Zope-3.1/src/zope/app/authentication/browser/schemasearch.txt
===================================================================
--- Zope3/branches/Zope-3.1/src/zope/app/authentication/browser/schemasearch.txt	2005-08-17 11:54:56 UTC (rev 37979)
+++ Zope3/branches/Zope-3.1/src/zope/app/authentication/browser/schemasearch.txt	2005-08-17 13:16:40 UTC (rev 37980)
@@ -61,7 +61,6 @@
     </div>
     <div class="field">
         /searchplugin
-      </field>
     </div>
   </div>
   <div class="row">

Modified: Zope3/branches/Zope-3.1/src/zope/app/authentication/groupfolder.py
===================================================================
--- Zope3/branches/Zope-3.1/src/zope/app/authentication/groupfolder.py	2005-08-17 11:54:56 UTC (rev 37979)
+++ Zope3/branches/Zope-3.1/src/zope/app/authentication/groupfolder.py	2005-08-17 13:16:40 UTC (rev 37980)
@@ -38,6 +38,7 @@
 from zope.app.security.interfaces import IAuthenticatedGroup, IEveryoneGroup
 from zope.app.authentication import principalfolder, interfaces
 
+
 class IGroupInformation(interface.Interface):
 
     title = schema.TextLine(
@@ -64,8 +65,8 @@
     zope.app.container.constraints.contains(IGroupInformation)
 
     prefix = schema.TextLine(
-        title=u"Group ID prefix",
-        description=u"Prefix added to IDs of groups in this folder",
+        title=_("Group ID prefix"),
+        description=_("Prefix added to IDs of groups in this folder"),
         readonly=True,
         )
 
@@ -84,7 +85,7 @@
 class IGroupSearchCriteria(interface.Interface):
 
     search = schema.TextLine(
-        title=u"Group Search String",
+        title=_("Group Search String"),
         required=False,
         missing_value=u'',
         )
@@ -124,7 +125,7 @@
         interfaces.IQuerySchemaSearch,
         IGroupFolder)
 
-    schema = (IGroupSearchCriteria)
+    schema = IGroupSearchCriteria
 
     def __init__(self, prefix=u''):
         self.prefix=prefix

Deleted: Zope3/branches/Zope-3.1/src/zope/app/securitypolicy/browser/grant.pt
===================================================================
--- Zope3/branches/Zope-3.1/src/zope/app/securitypolicy/browser/grant.pt	2005-08-17 11:54:56 UTC (rev 37979)
+++ Zope3/branches/Zope-3.1/src/zope/app/securitypolicy/browser/grant.pt	2005-08-17 13:16:40 UTC (rev 37980)
@@ -1,26 +0,0 @@
-<html metal:use-macro="context/@@standard_macros/dialog"
-    i18n:domain="zope">
-<body>
-
-<!-- This is just a temporary way of overriding the elements not needed,
-     only done for visual purposes. Do not clone this ;)
-                                                - Alexander
-                                                -->
-<div metal:fill-slot="tabs" />
-<div metal:fill-slot="actions" />
-
-<div metal:fill-slot="body">
-
-  <p>
-    <a href="@@AllRolePermissions.html"
-       i18n:translate="">Grant permissions to roles</a>
-  </p>
-  <p>
-    <a href="@@PrincipalRoles.html"
-       i18n:translate="">Grant roles to principals</a>
-  </p>
-
-</div>
-</body>
-</html>
-



More information about the Zope3-Checkins mailing list