X-Git-Url: https://git.llucax.com/software/sercom.git/blobdiff_plain/4d21b97ea5f6e4019f02476a10b419dd1f49d1e2..96aecf0ad67dc02363206c7212ab8813fab5f4d3:/sercom/subcontrollers/misentregas/__init__.py?ds=sidebyside 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: