From: Ricardo Markiewicz Date: Wed, 14 Mar 2007 17:20:13 +0000 (+0000) Subject: Permito ocultar cosas en el Menu para Entregador X-Git-Tag: 0_9_0~136 X-Git-Url: https://git.llucax.com/z.facultad/75.52/sercom.git/commitdiff_plain/623286fc914364430dcedeacd13d66b8e4365f60 Permito ocultar cosas en el Menu para Entregador --- diff --git a/sercom/menu.py b/sercom/menu.py index bc9fbee..beb4f57 100644 --- a/sercom/menu.py +++ b/sercom/menu.py @@ -14,6 +14,7 @@ class Menu: def _check(self, c): if hasattr(c, 'hide_to_admin') and 'admin' in identity.current.permissions: return False + if hasattr(c, 'hide_to_entregar') and 'admin' not in identity.current.permissions: return False return c.require.eval_with_object(identity.current) def __repr__(self): diff --git a/sercom/subcontrollers/tarea_fuente/__init__.py b/sercom/subcontrollers/tarea_fuente/__init__.py index 12921f7..1bc0769 100644 --- a/sercom/subcontrollers/tarea_fuente/__init__.py +++ b/sercom/subcontrollers/tarea_fuente/__init__.py @@ -51,6 +51,8 @@ class TareaFuenteController(controllers.Controller, identity.SecureResource): comandos = ComandoFuenteController() + hide_to_entregar = 1 + @expose() def default(self, tg_errors=None): """handle non exist urls""" diff --git a/sercom/subcontrollers/tarea_prueba/__init__.py b/sercom/subcontrollers/tarea_prueba/__init__.py index 44ae759..234978b 100644 --- a/sercom/subcontrollers/tarea_prueba/__init__.py +++ b/sercom/subcontrollers/tarea_prueba/__init__.py @@ -51,6 +51,8 @@ class TareaPruebaController(controllers.Controller, identity.SecureResource): comandos = ComandoPruebaController() + hide_to_entregar = 1 + @expose() def default(self, tg_errors=None): """handle non exist urls"""