Issue 2958: Links don't work properly if authentication has expired
Status:  New
Owner: ----
Reported by Mark.J.A...@gmail.com, Oct 13, 2014
************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.    *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS!  *****
************************************************************

Affected Version:

What steps will reproduce the problem?
1. Authenticate with Gerrit, do some code review on a normal non-draft change set
2. Authentication expires (e.g. from time passing, or log out in another browser tab)
3. Use a navigation link (e.g. from a source file in a change set to the main change set page)

What is the expected output? What do you see instead?

I expect either to be prompted to authenticate, or to go to the change set page without authentication. Instead, I am prompted with the error message "Code Review - Error drafts only available to authenticated users" and the "continue" button returns me to the page I was on.

1. The message text is wrong (this is not a draft).

2. That an error is triggered is not nice behaviour - reloading the page works fine (and shows the lack of authentication), so navigation should work also.

Please provide any additional information below.

Gerrit 2.9.1, Google OpenID auth, Chrome 37.0.2062.94 (64-bit) on Ubuntu 14.04 in use.
Oct 13, 2014
#1 Mark.J.A...@gmail.com
This is using the side-by-side diff in the new UI.
Oct 30, 2014
#2 richard.moehn@googlemail.com
I can confirm this with Firefox 31.10 on some Debian, also in 2.9.1. The behaviour in the current development version is different, though. (So maybe we could consider it fixed?) It shows a message box, which doesn't talk about drafts and in this message box you have two options: Close or sign in again. When you close (you have to close it twice…), you stay on the page with the diff, but now you can get out by using the navigation link.

By the way, I don't think the old message text is wrong, just a bit terse. What it wants to say is that you can't see draft comments if you're not logged in. And that's correct, I think.
Oct 30, 2014
#3 richard.moehn@googlemail.com
Well, if I think about it, it can't be considered fixed, because navigation should work immediately and not on the second try. And there is plenty more strange things that happen when the session is expired or ended from another tab. Even in the current version. Just go exploring a bit…