Index: Application.py
===================================================================
RCS file: /cvsroot/Zope/lib/python/OFS/Application.py,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 Application.py
--- Application.py	2000/08/07 04:22:29	1.1.1.3
+++ Application.py	2000/08/10 12:41:15
@@ -507,20 +507,6 @@
                         meta_type['product']=productObject.id
                         meta_types.append(meta_type)
 
-                    for name,method in pgetattr(
-                        product, 'methods', {}).items():
-                        if not hasattr(Folder, name):
-                            setattr(Folder, name, method)
-                            if name[-9:]!='__roles__': # not Just setting roles
-                                if (permissions.has_key(name) and
-                                    not folder_permissions.has_key(
-                                        permissions[name])):
-                                    permission=permissions[name]
-                                    if new_permissions.has_key(permission):
-                                        new_permissions[permission].append(name)
-                                    else:
-                                        new_permissions[permission]=[name]
-
                     if new_permissions:
                         new_permissions=new_permissions.items()
                         for permission, names in new_permissions:
@@ -528,6 +514,19 @@
                         new_permissions.sort()
                         Folder.__dict__['__ac_permissions__']=tuple(
                             list(Folder.__ac_permissions__)+new_permissions)
+
+                for name,method in pgetattr(product, 'methods', {}).items():
+                    if not hasattr(Folder, name):
+                        setattr(Folder, name, method)
+                        if name[-9:]!='__roles__': # not Just setting roles
+                            if (permissions.has_key(name) and
+                                not folder_permissions.has_key(
+                                    permissions[name])):
+                                permission=permissions[name]
+                                if new_permissions.has_key(permission):
+                                    new_permissions[permission].append(name)
+                                else:
+                                    new_permissions[permission]=[name]
 
                 if os.environ.get('ZEO_CLIENT',''):
                     # we don't want to install products from clients!
