Created
October 19, 2015 16:27
-
-
Save Elrhino/3236c723af0b8e565074 to your computer and use it in GitHub Desktop.
Code snippets from toaster launcher part 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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