Automatically move away from screens that require account info
If a screen requires user account information we can move off it when the user signs out of the application. This doesn't fix the browser history however. If the user moves backwards they would try to visit a page that needs account data, and probably get an error instead. Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
23
webapp/src/com/google/gerrit/client/ui/AccountScreen.java
Normal file
23
webapp/src/com/google/gerrit/client/ui/AccountScreen.java
Normal file
@@ -0,0 +1,23 @@
|
||||
// Copyright 2008 Google Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.ui;
|
||||
|
||||
/** A screen that requires the user to be signed-into their account. */
|
||||
public class AccountScreen extends Screen {
|
||||
public AccountScreen(final String heading) {
|
||||
super(heading);
|
||||
setRequiresSignIn(true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user