Skip to content

Instantly share code, notes, and snippets.

@Elrhino
Created October 19, 2015 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Elrhino/3236c723af0b8e565074 to your computer and use it in GitHub Desktop.
Save Elrhino/3236c723af0b8e565074 to your computer and use it in GitHub Desktop.
Code snippets from toaster launcher part 2
import com.google.inject.Inject;
import com.gwtplatform.mvp.client.annotations.DefaultGatekeeper;
import com.gwtplatform.mvp.client.proxy.Gatekeeper;
@DefaultGatekeeper
public class LoggedInGatekeeper implements Gatekeeper {
private CurrentUser currentUser;
@Inject
public LoggedInGatekeeper(CurrentUser currentUser) {
this.currentUser = currentUser;
}
@Override
public boolean canReveal() {
return currentUser.isLoggedIn();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment