AppDashboard redirect cleanup
@@ -372,6 +372,7 @@ class ShibbolethLoginPage(AppDashboard):
self.redirect("{1}/users/shibboleth?continue={0}".format(
self.request.get('continue'),
AppDashboardHelper.SHIBBOLETH_CONNECTOR))
+ return
target = '{0}/users/shibboleth?continue={1}'.format(
AppDashboardHelper.SHIBBOLETH_CONNECTOR,
@@ -700,6 +701,7 @@ class LogMainPage(AppDashboard):
apps_user_is_admin_on = self.helper.get_owned_apps()
if (not is_cloud_admin) and (not apps_user_is_admin_on):
self.redirect(DashPage.PATH, self.response)
+ return
query = ndb.gql('SELECT * FROM LoggedService')
all_services = []
@@ -730,6 +732,7 @@ class LogServicePage(AppDashboard):
apps_user_is_admin_on = self.helper.get_owned_apps()
if (not is_cloud_admin) and (service_name not in apps_user_is_admin_on):
self.redirect(DashPage.PATH, self.response)
+ return
service = LoggedService.get_by_id(service_name)
if service:
@@ -765,6 +768,7 @@ class LogServiceHostPage(AppDashboard):
apps_user_is_admin_on = self.helper.get_owned_apps()
if (not is_cloud_admin) and (service_name not in apps_user_is_admin_on):
self.redirect(DashPage.PATH, self.response)
+ return
encoded_cursor = self.request.get('next_cursor')
if encoded_cursor and encoded_cursor != "None":
@@ -815,6 +819,7 @@ class LogDownloader(AppDashboard):
is_cloud_admin = self.helper.is_user_cloud_admin()
if not is_cloud_admin:
self.redirect(DashPage.PATH)
+ return
success, uuid = self.helper.gather_logs()
self.render_app_page(page='logs', values={
@@ -1091,9 +1096,11 @@ class StatsPage(AppDashboard):
if not apps_user_is_admin_on:
self.redirect(DashPage.PATH, self.response)
+ return
if app_id not in apps_user_is_admin_on:
self.redirect(DashPage.PATH, self.response)
+ return
self.render_app_page(page='stats', values={
'appid': app_id,
