blob: a57dcb4f80d2fe2418125dbcdc45c211e73a9158 [file] [log] [blame]
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is govered by a BSD-style
# license that can be found in the LICENSE file or at
"""Redirect to /issues/entry or an external URL (like the wizard).
import logging
from framework import servlet
from framework import servlet_helpers
class IssueEntryAfterLogin(servlet.Servlet):
"""Redirect after clicking "New issue" and logging in."""
# Note: This servlet does not use an HTML template.
def GatherPageData(self, mr):
"""Build up a dictionary of data values to use when rendering the page."""
if not mr.auth.user_id:
self.abort(400, 'Only signed-in users should reach this URL.')
with mr.profiler.Phase('getting config'):
config =, mr.project_id)
entry_page_url = servlet_helpers.ComputeIssueEntryURL(mr, config)'Redirecting to %r', entry_page_url)
self.redirect(entry_page_url, abort=True)