Skip to content

Commit

Permalink
Merged from the ZopeX3-3.0-broken branch:
Browse files Browse the repository at this point in the history
  ------------------------------------------------------------------------
  r27300 | srichter | 2004-08-27 12:24:30 -0400 (Fri, 27 Aug 2004) | 3 lines

  Gave SkinDocumentation and LayerDocumentation a location upon creation. 
  Now the ftests pass again.

  ------------------------------------------------------------------------
  r27299 | jim | 2004-08-27 12:19:47 -0400 (Fri, 27 Aug 2004) | 5 lines

  Added logic to set adapter __parent__ attr to allow acquisition of
  grants.

  We need to find a way to automate setting adapter __parent__ attrs.

  ------------------------------------------------------------------------
  r27298 | jim | 2004-08-27 11:48:28 -0400 (Fri, 27 Aug 2004) | 5 lines

  Changed to use the global test manager, who has global grants.

  Really, only global users with global grants can use the application
  controller.  This needs some refinement in the future.

  ------------------------------------------------------------------------
  r27297 | jim | 2004-08-27 11:48:00 -0400 (Fri, 27 Aug 2004) | 5 lines

  Changed to use the global test manager, who has global grants.

  Really, only global users with global grants can use the application
  controller.  This needs some refinement in the future.

  ------------------------------------------------------------------------
  r27296 | jim | 2004-08-27 11:43:53 -0400 (Fri, 27 Aug 2004) | 5 lines

  Changed to use the global test manager, who has global grants.

  Really, only global users with global grants can use the application
  controller.  This needs some refinement in the future.

  ------------------------------------------------------------------------
  r27295 | jim | 2004-08-27 11:01:18 -0400 (Fri, 27 Aug 2004) | 3 lines

  Have annotation security maps parents, so that they can acquire
  permission grants.

  ------------------------------------------------------------------------
  r27294 | jim | 2004-08-27 11:01:16 -0400 (Fri, 27 Aug 2004) | 3 lines

  Made security-setting attributes public. There's nothing woth
  protecting there.

  ------------------------------------------------------------------------
  r27293 | jim | 2004-08-27 10:47:24 -0400 (Fri, 27 Aug 2004) | 44 lines

  Removed the global grant for the test manager.  This *should* have no
  effect, since there is a local grant.  But thre are a number of
  protected objects that don't get location information and, thus, can't
  acquire local grants.

  This change causes the following 12 tests to fail:

  ...
  • Loading branch information
Jim Fulton committed Aug 27, 2004
1 parent f1286d3 commit 9823fdf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions viewmodule/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from zope.app.apidoc.interfaces import IDocumentationModule
from zope.app.apidoc.utilities import relativizePath
from zope.app.i18n import ZopeMessageIDFactory as _
from zope.app.location import locate

# TODO: Temporary hack, since registering an adapter for a particular class is
# broken.
Expand Down Expand Up @@ -112,6 +113,8 @@ def getSkins(self):
for reg in service.registrations()
if isinstance(reg, SkinRegistration)]
skins.sort(lambda x, y: cmp(x.name, y.name))
# Make sure skins have a location
[locate(skin, self, skin.name) for skin in skins]
return skins


Expand Down Expand Up @@ -151,6 +154,7 @@ class SkinDocumentation(object):
implements(ISkinDocumentation)

def __init__(self, context):
self.__parent__ = context
self.context = context

# See ISkinDocumentation
Expand Down Expand Up @@ -184,6 +188,9 @@ def getLayers(self):
default = LayerRegistration('default',
'This is a predefined layer.')
layers.append(ILayerDocumentation(default))

# Make sure skins have a location
[locate(layer, self, layer.name) for layer in layers]
return layers

# See ISkinDocumentation
Expand Down

0 comments on commit 9823fdf

Please sign in to comment.