# Path: zengine/auth/permissions.py
# def _get_workflows():
#     from zengine.engine import ZEngine, WFCurrent
#     from zengine.models import BPMNWorkflow
# 
#     workflows = []
#     for wf in BPMNWorkflow.objects.all():
#         engine = ZEngine()
#         engine.current = WFCurrent(workflow_name=wf.name)
#         workflows.append(engine.load_or_create_workflow())
#     return workflows
# 
# Path: zengine/views/base.py
# class SysView(BaseView):
#     """
#     base class for non-wf system views
#     """
#     PATH = ''
#     ENABLED = True
#     pass
# 
# Path: zengine/config.py



from collections import defaultdict
from pyoko.lib.utils import get_object_from_path
from pyoko.lib.utils import lazy_property
from pyoko.model import model_registry
from zengine.auth.permissions import _get_workflows
from zengine.views.base import SysView
from zengine.config import settings
        from zengine.lib.cache import WFSpecNames
    def simple_crud():
        """
        Prepares menu entries for auto-generated model CRUD views.
        This is simple version of :attr:`get_crud_menus()` without
        Category support and permission control.
        Just for development purposes.

        Returns:
            Dict of list of dicts (``{'':[{}],}``). Menu entries.

        """
        results = defaultdict(list)
        for mdl in model_registry.get_base_models():
            results['other'].append({"text": mdl.Meta.verbose_name_plural,
                                     "wf": 'crud',
                                     "model": mdl.__name__,
                                     "kategori": settings.DEFAULT_OBJECT_CATEGORY_NAME})
        return results

    def get_crud_menus(self):
        """
        Generates menu entries according to
        :attr:`zengine.settings.OBJECT_MENU` and permissions
        of current user.

        Returns:
            Dict of list of dicts (``{'':[{}],}``). Menu entries.
        """
        results = defaultdict(list)
        for object_type in settings.OBJECT_MENU:

# Path: zengine/auth/permissions.py
# def _get_workflows():
#     from zengine.engine import ZEngine, WFCurrent
#     from zengine.models import BPMNWorkflow
# 
#     workflows = []
#     for wf in BPMNWorkflow.objects.all():
#         engine = ZEngine()
#         engine.current = WFCurrent(workflow_name=wf.name)
#         workflows.append(engine.load_or_create_workflow())
#     return workflows
# 
# Path: zengine/views/base.py
# class SysView(BaseView):
#     """
#     base class for non-wf system views
#     """
#     PATH = ''
#     ENABLED = True
#     pass
# 
# Path: zengine/config.py



# Path: zengine/views/menu.py
from collections import defaultdict
from pyoko.lib.utils import get_object_from_path
from pyoko.lib.utils import lazy_property
from pyoko.model import model_registry
from zengine.auth.permissions import _get_workflows
from zengine.views.base import SysView
from zengine.config import settings
        from zengine.lib.cache import WFSpecNames

    def simple_crud():
        """
        Prepares menu entries for auto-generated model CRUD views.
        This is simple version of :attr:`get_crud_menus()` without
        Category support and permission control.
        Just for development purposes.

        Returns:
            Dict of list of dicts (``{'':[{}],}``). Menu entries.

        """
        results = defaultdict(list)
        for mdl in model_registry.get_base_models():
            results['other'].append({"text": mdl.Meta.verbose_name_plural,
                                     "wf": 'crud',
                                     "model": mdl.__name__,
                                     "kategori": settings.DEFAULT_OBJECT_CATEGORY_NAME})
        return results

    def get_crud_menus(self):
        """
        Generates menu entries according to
        :attr:`zengine.settings.OBJECT_MENU` and permissions
        of current user.

        Returns:
            Dict of list of dicts (``{'':[{}],}``). Menu entries.
        """
        results = defaultdict(list)
        for object_type in settings.OBJECT_MENU:

            for model_data in settings.OBJECT_MENU[object_type]: