Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Play base controller
@With(BaseController.class)
public class Application extends Controller
{
// Normal controller actions here
}
public class BaseController extends Controller
{
@Before
static void setConnectedUser()
{
if (Security.isConnected())
{
User connectedUser = User.findById(Security.getConnectedUser());
renderArgs.put("connectedUser", connectedUser);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.