guillaumebort/play-gae

ifAdmin.tag doesn't check if user is userLoggedIn before throw llegalStateException : The current user is not logged in.

Closed this issue · 1 comments

evrything is in the title

the new ifAdmin.tag is :

%{
if(play.modules.gae.GAE.userService.userLoggedIn) {
if(play.modules.gae.GAE.userService.userAdmin) {
play.templates.TagContext.parent().data.put("_executeNextElse", false);
%}
#{doBody /}
%{
} else {
play.templates.TagContext.parent().data.put("_executeNextElse", true);
}
}
}%

new code should be :

%{
if(play.modules.gae.GAE.userService.userLoggedIn) {
if(play.modules.gae.GAE.userService.userAdmin) {
play.templates.TagContext.parent().data.put("_executeNextElse", false);
%}
#{doBody /}
%{
} else {
play.templates.TagContext.parent().data.put("_executeNextElse", true);
}
}
}%

I added this light modification in migration to SDK 1.6.0
Thanks