Author: wassek
Date: Mon Nov 12 15:54:32 2007
New Revision: 19122

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D19122&repname=
=3Djahia
Log:
logic for logArea Tag (login Area Tag)

Modified:
    branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/engines/login=
/Login_Engine.java

Modified: branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/engines=
/login/Login_Engine.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-INCLUD=
E-TAG-BRANCH/core/src/java/org/jahia/engines/login/Login_Engine.java&rev=3D=
19122&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/engines/login=
/Login_Engine.java (original)
+++ branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/engines/login=
/Login_Engine.java Mon Nov 12 15:54:32 2007
@@ -27,6 +27,7 @@
 import org.jahia.engines.validation.EngineValidationHelper;
 import org.jahia.exceptions.JahiaException;
 import org.jahia.exceptions.JahiaSessionExpirationException;
+import org.jahia.params.ParamBean;
 import org.jahia.params.ProcessingContext;
 import org.jahia.registries.ServicesRegistry;
 import org.jahia.services.pages.ContentPage;
@@ -169,10 +170,27 @@
                                 "The user do not have read access to the r=
equested page ( other than GUEST ) !");
 =

                         logger.error ("User " + username + " cannot log in=
 from this page");
-                        engineMap.put ("notAllowedToLoginFromThisPage", Bo=
olean.TRUE);
-                        engineMap.put ("screen", "edit");
-                        engineMap.put (ENGINE_URL_PARAM, jParams.composeEn=
gineUrl (ENGINE_NAME, EMPTY_STRING));
-                        engineMap.put ("jspSource", BADLOGIN_JSP);
+                        if(jParams.getParameter ("logtag") !=3D null)
+                       {
+                              engineMap.put ("notAllowedToLoginFromThisPag=
e", Boolean.TRUE);
+                              engineMap.put ("screen", "edit");
+                              engineMap.put (ENGINE_URL_PARAM, jParams.com=
poseEngineUrl ("", EMPTY_STRING));
+                              if(jParams instanceof ParamBean)
+                              {
+                                ((ParamBean)jParams).getSession().setAttri=
bute("notAllowedLogin", "1");
+                              }
+                              else     =

+                                jParams.setAttribute("NotAllowedLogin", "1=
");                            =

+                               =

+                       }
+                          else
+                          {
+                            engineMap.put ("notAllowedToLoginFromThisPage"=
, Boolean.TRUE);
+                            engineMap.put ("screen", "edit");
+                            engineMap.put (ENGINE_URL_PARAM, jParams.compo=
seEngineUrl (ENGINE_NAME, EMPTY_STRING));
+                            engineMap.put ("jspSource", BADLOGIN_JSP);
+                          }
+        =

                         return;
                     }
                 } catch (Throwable t) {
@@ -197,10 +215,25 @@
             ServicesRegistry.getInstance ().getJahiaEventService ().fireLo=
gin (theEvent);
 =

         } else {
-            engineMap.put ("notAllowedToLoginFromThisPage", Boolean.FALSE);
-            engineMap.put ("screen", "edit");
-            engineMap.put (ENGINE_URL_PARAM, jParams.composeEngineUrl (ENG=
INE_NAME, EMPTY_STRING));
-            engineMap.put ("jspSource", BADLOGIN_JSP);
+               if(jParams.getParameter ("logtag") !=3D null)
+               {
+                engineMap.put ("notAllowedToLoginFromThisPage", Boolean.FA=
LSE);
+                engineMap.put ("screen", "edit");
+                engineMap.put (ENGINE_URL_PARAM, jParams.composeEngineUrl =
("", EMPTY_STRING));
+                if(jParams instanceof ParamBean)
+                {
+                  ((ParamBean)jParams).getSession().setAttribute("wrongLog=
in", "1");
+                }
+                else   =

+                  jParams.setAttribute("wrongLogin", "1");
+               }
+               else
+               {
+              engineMap.put ("notAllowedToLoginFromThisPage", Boolean.FALS=
E);
+              engineMap.put ("screen", "edit");
+              engineMap.put (ENGINE_URL_PARAM, jParams.composeEngineUrl (E=
NGINE_NAME, EMPTY_STRING));
+              engineMap.put ("jspSource", BADLOGIN_JSP);
+               }
         }
 =

         logger.debug ("end");

_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list

Reply via email to