Ask user to login if change is not found
Accessing a change URL fails with 'Application Error - The page you requested was not found, or you do not have permission to view this page' if the user is not signed in and the change is not visible to 'Anonymous Users'. Instead Gerrit now asks the user to login and afterwards shows the change to the user if it exists and is visible. If the change doesn't exist or is not visible, the user will still get the NotFoundScreen after sign in. Since we always show the sign in dialog when the user is not signed in and a change is not found, a user can't probe change URLs to find out whether a change exists or not. Change-Id: Ibe92fbc64567438d018576dabccf3bdc9616c3d9 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -37,8 +37,11 @@ public abstract class GerritCallback<T> implements AsyncCallback<T> {
|
||||
new NotSignedInDialog().center();
|
||||
|
||||
} else if (isNoSuchEntity(caught)) {
|
||||
new ErrorDialog(Gerrit.C.notFoundBody()).center();
|
||||
|
||||
if (Gerrit.isSignedIn()) {
|
||||
new ErrorDialog(Gerrit.C.notFoundBody()).center();
|
||||
} else {
|
||||
new NotSignedInDialog().center();
|
||||
}
|
||||
} else if (isInactiveAccount(caught)) {
|
||||
new ErrorDialog(Gerrit.C.inactiveAccountBody()).center();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user