コード例 #1
0
    def can_enable_forth_level(self):
        """ Helper method used by the actions to know if they should
        be displayed or not
        """
        context = self._get_real_context()

        sm = getSecurityManager()
        if not sm.checkPermission("Portlets: Manage portlets", context):
            return False

        depth = len(context.getPhysicalPath()[2:])
        if depth == 3 and not IForthLevelNavigation.providedBy(context):
            return True
        else:
            return False
コード例 #2
0
 def is_enabled(self):
     context = self._get_real_context()
     return IForthLevelNavigation.providedBy(context)