def getContext(self): context = self.context while not IContentSpace.providedBy(context): context = context.__parent__ if context is None: return return context
def isAvailable(self): if not IContentSpace.providedBy(self.context): return False return super(EditSpaceAction, self).isAvailable()