From 98efc1e3ae709658bc4b1da8d7a4385b01fabfd5 Mon Sep 17 00:00:00 2001 From: Ricardo Markiewicz Date: Sun, 18 Mar 2007 17:44:28 +0000 Subject: [PATCH 1/1] deniego la entrada a mis_entregas a los admines por las dudas --- sercom/subcontrollers/misentregas/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sercom/subcontrollers/misentregas/__init__.py b/sercom/subcontrollers/misentregas/__init__.py index 88259c2..3cb127b 100644 --- a/sercom/subcontrollers/misentregas/__init__.py +++ b/sercom/subcontrollers/misentregas/__init__.py @@ -2,7 +2,7 @@ #{{{ Imports import cherrypy -from turbogears import controllers, expose, redirect +from turbogears import controllers, expose, redirect, url from turbogears import validate, flash, error_handler from turbogears import validators as V from turbogears import widgets as W @@ -121,6 +121,11 @@ class MisEntregasController(controllers.Controller, identity.SecureResource): @paginate('records') def list(self): """List records in model""" + # Un admin no tiene sentido en este area y por las dudas + # lo mando al home. + if 'admin' in identity.current.permissions: + raise redirect(url("/dashboard")) + # Grupos en los que el usuario formo parte m = [i.grupo.id for i in Grupo.selectByAlumno(identity.current.user)] try: -- 2.43.0