From: Ricardo Markiewicz Date: Sun, 18 Mar 2007 17:44:28 +0000 (+0000) Subject: deniego la entrada a mis_entregas a los admines por las dudas X-Git-Tag: 0_9_0~36 X-Git-Url: https://git.llucax.com/z.facultad/75.52/sercom.git/commitdiff_plain/98efc1e3ae709658bc4b1da8d7a4385b01fabfd5?ds=inline;hp=44dcfb7c771112febabc4a325ef836a7c5614f4b deniego la entrada a mis_entregas a los admines por las dudas --- 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: