Merge lp:~salgado/launchpad/bug-540697 into lp:launchpad

Proposed by Guilherme Salgado
Status: Merged
Merged at revision: not available
Proposed branch: lp:~salgado/launchpad/bug-540697
Merge into: lp:launchpad
Diff against target: 21 lines (+0/-4)
1 file modified
lib/canonical/launchpad/webapp/login.py (+0/-4)
To merge this branch: bzr merge lp:~salgado/launchpad/bug-540697
Reviewer Review Type Date Requested Status
Paul Hummer (community) code Approve
Review via email: mp+21648@code.launchpad.net

Description of the change

Do not add a notification message to the request on UnauthorizedView as
the +login page (which it redirects to) is blank and will just redirect
to the OpenID provider (bug 540697)

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/canonical/launchpad/webapp/login.py

== Pylint notices ==

lib/canonical/launchpad/webapp/login.py
    5: [W0105] String statement has no effect

To post a comment you must log in.
Revision history for this message
Paul Hummer (rockstar) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/webapp/login.py'
--- lib/canonical/launchpad/webapp/login.py 2010-03-04 14:03:34 +0000
+++ lib/canonical/launchpad/webapp/login.py 2010-03-18 15:28:31 +0000
@@ -56,8 +56,6 @@
56 read_only_page = ViewPageTemplateFile(56 read_only_page = ViewPageTemplateFile(
57 '../templates/launchpad-readonlyfailure.pt')57 '../templates/launchpad-readonlyfailure.pt')
5858
59 notification_message = _('To continue, you must log in to Launchpad.')
60
61 def __call__(self):59 def __call__(self):
62 # In read only mode, Unauthorized exceptions get raised by the60 # In read only mode, Unauthorized exceptions get raised by the
63 # security policy when write permissions are requested. We need61 # security policy when write permissions are requested. We need
@@ -105,8 +103,6 @@
105 # unauthenticated sessions. Only after this next line is it safe103 # unauthenticated sessions. Only after this next line is it safe
106 # to use the ``addNoticeNotification`` method.104 # to use the ``addNoticeNotification`` method.
107 allowUnauthenticatedSession(self.request)105 allowUnauthenticatedSession(self.request)
108 self.request.response.addNoticeNotification(
109 self.notification_message)
110 self.request.response.redirect(target)106 self.request.response.redirect(target)
111 # Maybe render page with a link to the redirection?107 # Maybe render page with a link to the redirection?
112 return ''108 return ''