Edgewall Software

Ticket #5340: main.py.patch

File main.py.patch, 0.6 KB (added by Dave Abrahams <dave@…>, 18 months ago)

patch for trac/web/main.py

  • main.py

     
    445445        data = {'title': title, 'type': 'TracError', 'message': e.detail, 
    446446                'frames': [], 'traceback': None} 
    447447        try: 
     448            if (req.authname == 'anonymous') and (e.reason == 'Forbidden'): 
     449                req.redirect(env.href('login', {'referer':req.abs_href(req.path_info)})) 
    448450            req.send_error(sys.exc_info(), status=e.code, env=env, data=data) 
    449451        except RequestDone: 
    450452            return []