Permalink
Browse files

[#2] added correction suggested ticket #2 in tag ifAdmin to verify us…

…er is logged before admin
  • Loading branch information...
mandubian committed Nov 24, 2011
1 parent f9d8dfb commit 8af6814821ca9638e1f053137c1ddbd4d5969aa0
Showing with 5 additions and 2 deletions.
  1. +4 −1 app/views/tags/gae/ifAdmin.tag
  2. +1 −1 src/play/modules/gae/GAE.java
@@ -1,4 +1,6 @@
%{
+ if(play.modules.gae.GAE.userService.userLoggedIn) {
+
if(play.modules.gae.GAE.userService.userAdmin) {
play.templates.TagContext.parent().data.put("_executeNextElse", false);
%}
@@ -7,4 +9,5 @@
} else {
play.templates.TagContext.parent().data.put("_executeNextElse", true);
}
-}%
+ }
+}%
@@ -61,7 +61,7 @@ public static void login(String returnAction,
* the action where the user will be redirected after the login
*/
public static void login(String returnAction) {
- login(Request.current().action, null);
+ login(returnAction, null);
}
/**

0 comments on commit 8af6814

Please sign in to comment.