svn commit: r549406 - in /ofbiz/trunk: applications/accounting/webapp/accounting/WEB-INF/ applications/accounting/widget/ applications/content/webapp/content/WEB-INF/ applications/content/widget/ applications/ecommerce/webapp/ecommerce/ applications/ec...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r549406 - in /ofbiz/trunk: applications/accounting/webapp/accounting/WEB-INF/ applications/accounting/widget/ applications/content/webapp/content/WEB-INF/ applications/content/widget/ applications/ecommerce/webapp/ecommerce/ applications/ec...

jacopoc
Author: jacopoc
Date: Wed Jun 20 23:20:53 2007
New Revision: 549406

URL: http://svn.apache.org/viewvc?view=rev&rev=549406
Log:
Implemented 'Require Password Change' in ecommerce and manager apps: if the new field in the UserLogin entity is set to Y then, before the login, the user will be prompted for a new password.

Added:
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/requirePasswordChange.ftl   (with props)
    ofbiz/trunk/framework/common/webcommon/changePassword.ftl   (with props)
Modified:
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
    ofbiz/trunk/applications/accounting/widget/CommonScreens.xml
    ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml
    ofbiz/trunk/applications/content/widget/CommonScreens.xml
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
    ofbiz/trunk/applications/ecommerce/widget/CommonScreens.xml
    ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml
    ofbiz/trunk/applications/humanres/widget/CommonScreens.xml
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
    ofbiz/trunk/applications/manufacturing/widget/manufacturing/CommonScreens.xml
    ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/controller.xml
    ofbiz/trunk/applications/marketing/widget/CommonScreens.xml
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml
    ofbiz/trunk/applications/order/widget/ordermgr/CommonScreens.xml
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml
    ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml
    ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml
    ofbiz/trunk/applications/product/widget/catalog/CommonScreens.xml
    ofbiz/trunk/applications/product/widget/facility/CommonScreens.xml
    ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java
    ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml
    ofbiz/trunk/applications/workeffort/widget/CommonScreens.xml
    ofbiz/trunk/framework/common/config/CommonUiLabels.properties
    ofbiz/trunk/framework/common/servicedef/services.xml
    ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java
    ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml
    ofbiz/trunk/framework/example/widget/example/CommonScreens.xml
    ofbiz/trunk/framework/security/entitydef/entitymodel.xml
    ofbiz/trunk/framework/shark/webapp/shark/WEB-INF/controller.xml
    ofbiz/trunk/framework/shark/widget/CommonScreens.xml
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml
    ofbiz/trunk/framework/webtools/widget/CommonScreens.xml
    ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/controller.xml
    ofbiz/trunk/specialpurpose/assetmaint/widget/CommonScreens.xml
    ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/WEB-INF/controller.xml
    ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/controller.xml
    ofbiz/trunk/specialpurpose/oagis/webapp/oagis/WEB-INF/controller.xml
    ofbiz/trunk/specialpurpose/oagis/widget/CommonScreens.xml
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Wed Jun 20 23:20:53 2007
@@ -60,6 +60,7 @@
         <security https="true" auth="false"/>
         <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="login"/>
         <response name="success" type="view" value="main"/>
+        <response name="requirePasswordChange" type="view" value="requirePasswordChange"/>
         <response name="error" type="view" value="login"/>
     </request-map>
 
@@ -1366,7 +1367,8 @@
     <view-map name="error" page="/error/error.jsp"/>
     <view-map name="main" type="screen" page="component://accounting/widget/CommonScreens.xml#main"/>
     <view-map name="login" type="screen" page="component://accounting/widget/CommonScreens.xml#login"/>
-    
+    <view-map name="requirePasswordChange" type="screen" page="component://accounting/widget/CommonScreens.xml#requirePasswordChange"/>
+
     <!-- BillingAccount -->
     <view-map name="FindBillingAccount" type="screen" page="component://accounting/widget/BillingAccountScreens.xml#FindBillingAccount"/>
     <view-map name="EditBillingAccount" type="screen" page="component://accounting/widget/BillingAccountScreens.xml#EditBillingAccount"/>

Modified: ofbiz/trunk/applications/accounting/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/CommonScreens.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/CommonScreens.xml Wed Jun 20 23:20:53 2007
@@ -320,4 +320,17 @@
             </widgets>
         </section>
     </screen>
+    <screen name="requirePasswordChange">
+        <section>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://common/webcommon/changePassword.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>

Modified: ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml Wed Jun 20 23:20:53 2007
@@ -58,7 +58,8 @@
     <request-map uri="login">
         <security https="true" auth="false"/>
         <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="login"/>
-        <response name="success" type="request" value="checkLogin"/>
+        <response name="success" type="view" value="main"/>
+        <response name="requirePasswordChange" type="view" value="requirePasswordChange"/>
         <response name="error" type="view" value="login"/>
     </request-map>
 
@@ -1680,6 +1681,7 @@
     <view-map name="error" page="/error/error.jsp"/>
     <view-map name="main" type="screen" page="component://content/widget/CommonScreens.xml#main"/>
     <view-map name="login" type="screen" page="component://content/widget/CommonScreens.xml#login"/>
+    <view-map name="requirePasswordChange" type="screen" page="component://content/widget/CommonScreens.xml#requirePasswordChange"/>
     <view-map name="fonts.fo" type="screenfop" page="component://content/widget/CommonScreens.xml#fonts.fo" content-type="application/pdf" encoding="none"/>
     
     <view-map name="FindForumGroups" page="component://content/widget/forum/ForumScreens.xml#FindForumGroups" type="screen"/>

Modified: ofbiz/trunk/applications/content/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/CommonScreens.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/content/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/content/widget/CommonScreens.xml Wed Jun 20 23:20:53 2007
@@ -317,6 +317,19 @@
             </widgets>
         </section>
     </screen>
+    <screen name="requirePasswordChange">
+        <section>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://common/webcommon/changePassword.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
     <screen name="responseTreeLine">
         <section>
             <actions>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml Wed Jun 20 23:20:53 2007
@@ -86,6 +86,7 @@
         <security https="true" auth="false"/>
         <event type="java" path="org.ofbiz.securityext.login.LoginEvents" invoke="storeLogin"/>
         <response name="success" type="view" value="main"/>
+        <response name="requirePasswordChange" type="view" value="requirePasswordChange"/>
         <response name="error" type="view" value="login"/>
     </request-map>
     <request-map uri="logout">
@@ -1557,6 +1558,7 @@
     <view-map name="main" type="screen" page="component://ecommerce/widget/CommonScreens.xml#main"/>
     <view-map name="policies" type="screen" page="component://ecommerce/widget/CommonScreens.xml#policies"/>
     <view-map name="login" type="screen" page="component://ecommerce/widget/CommonScreens.xml#login"/>
+    <view-map name="requirePasswordChange" type="screen" page="component://ecommerce/widget/CommonScreens.xml#requirePasswordChange"/>
 
     <!-- Cart Views -->
     <view-map name="editShoppingList" type="screen" page="component://ecommerce/widget/ShoppingListScreens.xml#editShoppingList"/>

Added: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/requirePasswordChange.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/requirePasswordChange.ftl?view=auto&rev=549406
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/requirePasswordChange.ftl (added)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/requirePasswordChange.ftl Wed Jun 20 23:20:53 2007
@@ -0,0 +1,68 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<#assign username = ""/>
+<#if requestParameters.USERNAME?has_content>
+  <#assign username = requestParameters.USERNAME/>
+<#elseif autoUserLogin?has_content>
+  <#assign username = autoUserLogin.userLoginId/>
+</#if>
+
+<div class="head1">${uiLabelMap.CommonLogin}</div>
+<br/>
+
+<div style="float: center; width: 49%; margin-right: 5px; text-align: center;" class="screenlet">
+    <div class="screenlet-header">
+        <div class="boxhead">${uiLabelMap.CommonRegistered}</div>
+    </div>
+    <div class="screenlet-body" style="text-align: center;">
+      <form method="post" action="<@ofbizUrl>login${previousParams}</@ofbizUrl>" name="loginform">
+          <input type="hidden" name="requirePasswordChange" value="Y"/>
+          <input type="hidden" name="USERNAME" value="${username}"/>
+          <div class="tabletext">
+              ${uiLabelMap.CommonUsername}:&nbsp;${username}
+          </div>
+          <#if autoUserLogin?has_content>
+              <div class="tabletext">
+                  (${uiLabelMap.CommonNot}&nbsp;${autoUserLogin.userLoginId}?&nbsp;<a href="<@ofbizUrl>${autoLogoutUrl}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonClickHere}</a>)
+              </div>
+          </#if>
+          <div class="tabletext">
+              ${uiLabelMap.CommonPassword}:&nbsp;
+              <input type="password" class="inputBox" name="PASSWORD" value="" size="20"/>
+          </div>
+          <div class="tabletext">
+              ${uiLabelMap.CommonNewPassword}:&nbsp;
+              <input type="password" class="inputBox" name="newPassword" value="" size="20"/>
+          </div>
+          <div class="tabletext">
+              ${uiLabelMap.CommonNewPasswordVerify}:&nbsp;
+              <input type="password" class="inputBox" name="newPasswordVerify" value="" size="20"/>
+          </div>
+          <div class="tabletext">
+              <input type="submit" class="smallSubmit" value="${uiLabelMap.CommonLogin}"/>
+          </div>
+      </form>
+    </div>
+</div>
+
+<script language="JavaScript" type="text/javascript">
+  <#if autoUserLogin?has_content>document.loginform.PASSWORD.focus();</#if>
+  <#if !autoUserLogin?has_content>document.loginform.USERNAME.focus();</#if>
+</script>

Propchange: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/requirePasswordChange.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/requirePasswordChange.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/requirePasswordChange.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/applications/ecommerce/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/widget/CommonScreens.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/ecommerce/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/ecommerce/widget/CommonScreens.xml Wed Jun 20 23:20:53 2007
@@ -244,6 +244,24 @@
             </widgets>
         </section>
     </screen>
+    <screen name="requirePasswordChange">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleLogin"/>
+                <set field="headerItem" value="login"/>
+                <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/login.bsh"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://ecommerce/webapp/ecommerce/requirePasswordChange.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
     <screen name="responseTreeLine">
         <section>
             <actions>

Modified: ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml Wed Jun 20 23:20:53 2007
@@ -62,6 +62,7 @@
         <security https="true" auth="false"/>
         <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="login"/>
         <response name="success" type="view" value="main"/>
+        <response name="requirePasswordChange" type="view" value="requirePasswordChange"/>
         <response name="error" type="view" value="login"/>
     </request-map>
 
@@ -535,6 +536,7 @@
 
     <view-map name="main" type="screen" page="component://humanres/widget/CommonScreens.xml#main"/>
     <view-map name="login" type="screen" page="component://humanres/widget/CommonScreens.xml#login"/>
+    <view-map name="requirePasswordChange" type="screen" page="component://humanres/widget/CommonScreens.xml#requirePasswordChange"/>
     <view-map name="ListPerfReviews" type="screen" page="component://humanres/widget/PartyAbilityScreens.xml#ListPerfReviews"/>
     <view-map name="EditPerfReviews" type="screen" page="component://humanres/widget/PartyAbilityScreens.xml#EditPerfReviews"/>    
     <view-map name="EditPerfReviewItems" type="screen" page="component://humanres/widget/PartyAbilityScreens.xml#EditPerfReviewItems"/>

Modified: ofbiz/trunk/applications/humanres/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/CommonScreens.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/CommonScreens.xml Wed Jun 20 23:20:53 2007
@@ -191,4 +191,17 @@
             </widgets>
         </section>
     </screen>
+    <screen name="requirePasswordChange">
+        <section>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://common/webcommon/changePassword.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml Wed Jun 20 23:20:53 2007
@@ -61,6 +61,7 @@
         <security https="true" auth="false"/>
         <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="login"/>
         <response name="success" type="view" value="main"/>
+        <response name="requirePasswordChange" type="view" value="requirePasswordChange"/>
         <response name="error" type="view" value="login"/>
     </request-map>
 
@@ -753,6 +754,7 @@
     <view-map name="error" page="/error/error.jsp"/>
     <view-map name="main" page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#FindProductionRun" type="screen"/>
     <view-map name="login" type="screen" page="component://manufacturing/widget/manufacturing/CommonScreens.xml#login"/>
+    <view-map name="requirePasswordChange" type="screen" page="component://manufacturing/widget/manufacturing/CommonScreens.xml#requirePasswordChange"/>
 
     <!-- Routing view mappings -->
     <view-map name="FindCalendar" page="component://manufacturing/widget/manufacturing/CalendarScreens.xml#FindCalendar" type="screen"/>

Modified: ofbiz/trunk/applications/manufacturing/widget/manufacturing/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/CommonScreens.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/manufacturing/widget/manufacturing/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/manufacturing/widget/manufacturing/CommonScreens.xml Wed Jun 20 23:20:53 2007
@@ -56,5 +56,18 @@
             </widgets>
         </section>
     </screen>
+    <screen name="requirePasswordChange">
+        <section>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://common/webcommon/changePassword.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>
 

Modified: ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/controller.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/controller.xml Wed Jun 20 23:20:53 2007
@@ -62,6 +62,7 @@
         <security https="true" auth="false"/>
         <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="login"/>
         <response name="success" type="view" value="main"/>
+        <response name="requirePasswordChange" type="view" value="requirePasswordChange"/>
         <response name="error" type="view" value="login"/>
     </request-map>
 
@@ -407,6 +408,7 @@
     <view-map name="error" page="/error/error.jsp"/>
     <view-map name="main" type="screen" page="component://marketing/widget/CommonScreens.xml#main"/>
     <view-map name="login" type="screen" page="component://marketing/widget/CommonScreens.xml#login"/>
+    <view-map name="requirePasswordChange" type="screen" page="component://marketing/widget/CommonScreens.xml#requirePasswordChange"/>
     <view-map name="MarketingReport" type="screen" page="component://marketing/widget/MarketingReportScreens.xml#MarketingReportList"/>
     
     <view-map name="FindDataSource"  type="screen" page="component://marketing/widget/DataSourceScreens.xml#ListDataSource"/>

Modified: ofbiz/trunk/applications/marketing/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/CommonScreens.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/CommonScreens.xml Wed Jun 20 23:20:53 2007
@@ -113,4 +113,17 @@
             </widgets>
         </section>
     </screen>
+    <screen name="requirePasswordChange">
+        <section>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://common/webcommon/changePassword.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml Wed Jun 20 23:20:53 2007
@@ -61,6 +61,7 @@
         <security https="true" auth="false"/>
         <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="login"/>
         <response name="success" type="view" value="main"/>
+        <response name="requirePasswordChange" type="view" value="requirePasswordChange"/>
         <response name="error" type="view" value="login"/>
     </request-map>
 
@@ -1512,6 +1513,7 @@
     <view-map name="error" page="/error/error.jsp"/>
     <view-map name="main" type="screen" page="component://order/widget/ordermgr/OrderViewScreens.xml#OrderHeaderListView"/>
     <view-map name="login" type="screen" page="component://order/widget/ordermgr/CommonScreens.xml#login"/>
+    <view-map name="requirePasswordChange" type="screen" page="component://order/widget/ordermgr/CommonScreens.xml#requirePasswordChange"/>
 
     <view-map name="orderstats" type="screen" page="component://order/widget/ordermgr/OrderViewScreens.xml#OrderStats"/>
     <view-map name="findorders" type="screen" page="component://order/widget/ordermgr/OrderViewScreens.xml#OrderFindOrder"/>

Modified: ofbiz/trunk/applications/order/widget/ordermgr/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/CommonScreens.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/CommonScreens.xml Wed Jun 20 23:20:53 2007
@@ -131,6 +131,18 @@
             </widgets>
         </section>
     </screen>
-
+    <screen name="requirePasswordChange">
+        <section>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://common/webcommon/changePassword.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>
 

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml Wed Jun 20 23:20:53 2007
@@ -58,6 +58,7 @@
       <security https="true" auth="false"/>
       <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="login"/>
       <response name="success" type="view" value="main"/>
+      <response name="requirePasswordChange" type="view" value="requirePasswordChange"/>
       <response name="error" type="view" value="login"/>
     </request-map>
 
@@ -913,6 +914,7 @@
     <view-map name="error" page="/error/error.jsp"/>
     <view-map name="main" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#findparty"/>
     <view-map name="login" type="screen" page="component://party/widget/partymgr/CommonScreens.xml#login"/>
+    <view-map name="requirePasswordChange" type="screen" page="component://party/widget/partymgr/CommonScreens.xml#requirePasswordChange"/>
 
     <view-map name="findparty" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#findparty"/>
 

Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/PartyForms.xml Wed Jun 20 23:20:53 2007
@@ -85,6 +85,9 @@
         <field name="enabled"><hidden/></field>
         <field name="currentPassword"><password/></field>
         <field name="currentPasswordVerify"><password/></field>
+        <field name="requirePasswordChange">
+            <drop-down allow-empty="false" no-current-selected-key="N"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down>
+        </field>
         <field name="submitButton" title="${uiLabelMap.CommonSave}" widget-style="smallSubmit"><submit button-type="text-link"/></field>
         <field name="cancelLink" title="" widget-style="smallSubmit"><hyperlink target="${donePage}?partyId=${partyId}" also-hidden="false" description="${uiLabelMap.CommonCancelDone}"/></field>
     </form>

Modified: ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml Wed Jun 20 23:20:53 2007
@@ -284,6 +284,19 @@
             </widgets>
         </section>
     </screen>
+    <screen name="requirePasswordChange">
+        <section>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://common/webcommon/changePassword.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>
 
 

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml Wed Jun 20 23:20:53 2007
@@ -60,6 +60,7 @@
         <security https="true" auth="false"/>
         <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="login"/>
         <response name="success" type="view" value="main"/>
+        <response name="requirePasswordChange" type="view" value="requirePasswordChange"/>
         <response name="error" type="view" value="login"/>
     </request-map>
 
@@ -2378,6 +2379,7 @@
     <view-map name="error" page="/error/error.jsp"/>
     <view-map name="main" type="screen" page="component://product/widget/catalog/CommonScreens.xml#main"/>
     <view-map name="login" type="screen" page="component://product/widget/catalog/CommonScreens.xml#login"/>
+    <view-map name="requirePasswordChange" type="screen" page="component://product/widget/catalog/CommonScreens.xml#requirePasswordChange"/>
 
     <view-map name="ChooseTopCategory" type="screen" page="component://product/widget/catalog/CommonScreens.xml#ChooseTopCategory"/>
     <view-map name="FastLoadCache" type="screen" page="component://product/widget/catalog/CommonScreens.xml#FastLoadCache"/>

Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml Wed Jun 20 23:20:53 2007
@@ -60,6 +60,7 @@
         <security https="true" auth="false"/>
         <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="login"/>
         <response name="success" type="request" value="checkLogin"/>
+        <response name="requirePasswordChange" type="view" value="requirePasswordChange"/>
         <response name="error" type="view" value="login"/>
     </request-map>
 
@@ -1128,6 +1129,7 @@
     <view-map name="error" page="/error/error.jsp"/>
     <view-map name="main" type="screen" page="component://product/widget/facility/FacilityScreens.xml#FindFacility"/>
     <view-map name="login" type="screen" page="component://product/widget/facility/CommonScreens.xml#login"/>
+    <view-map name="requirePasswordChange" type="screen" page="component://product/widget/facility/CommonScreens.xml#requirePasswordChange"/>
 
     <view-map name="FindFacility" type="screen" page="component://product/widget/facility/FacilityScreens.xml#FindFacility"/>
     <view-map name="EditFacility" type="screen" page="component://product/widget/facility/FacilityScreens.xml#EditFacility"/>

Modified: ofbiz/trunk/applications/product/widget/catalog/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/CommonScreens.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/CommonScreens.xml Wed Jun 20 23:20:53 2007
@@ -148,4 +148,17 @@
             </widgets>
         </section>
     </screen>
+    <screen name="requirePasswordChange">
+        <section>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://common/webcommon/changePassword.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>

Modified: ofbiz/trunk/applications/product/widget/facility/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/CommonScreens.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/facility/CommonScreens.xml Wed Jun 20 23:20:53 2007
@@ -55,6 +55,19 @@
             </widgets>
         </section>
     </screen>
+    <screen name="requirePasswordChange">
+        <section>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://common/webcommon/changePassword.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 
     <screen name="CommonFacilityDecorator">
         <section>

Modified: ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java (original)
+++ ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java Wed Jun 20 23:20:53 2007
@@ -339,7 +339,7 @@
 
     public static String storeLogin(HttpServletRequest request, HttpServletResponse response) {
         String responseString = LoginWorker.login(request, response);
-        if ("error".equals(responseString)) {
+        if (!"success".equals(responseString)) {
             return responseString;
         }
         // if we logged in okay, do the check store customer role

Modified: ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml Wed Jun 20 23:20:53 2007
@@ -56,6 +56,7 @@
       <security https="true" auth="false"/>
       <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="login"/>
       <response name="success" type="view" value="main"/>
+      <response name="requirePasswordChange" type="view" value="requirePasswordChange"/>
       <response name="error" type="view" value="login"/>
     </request-map>
 
@@ -606,6 +607,7 @@
     <view-map name="error" page="/error/error.jsp"/>
     <view-map name="main" type="screen" page="component://workeffort/widget/CommonScreens.xml#main"/>
     <view-map name="login" type="screen" page="component://workeffort/widget/CommonScreens.xml#login"/>
+    <view-map name="requirePasswordChange" type="screen" page="component://workeffort/widget/CommonScreens.xml#requirePasswordChange"/>
 
     <view-map name="RequestList" type="screen" page="component://workeffort/widget/RequestScreens.xml#RequestList"/>
     

Modified: ofbiz/trunk/applications/workeffort/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/CommonScreens.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/applications/workeffort/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/workeffort/widget/CommonScreens.xml Wed Jun 20 23:20:53 2007
@@ -176,6 +176,19 @@
             </widgets>
         </section>
     </screen>
+    <screen name="requirePasswordChange">
+        <section>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://common/webcommon/changePassword.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
     <screen name="main">
         <section>
             <actions>

Modified: ofbiz/trunk/framework/common/config/CommonUiLabels.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/CommonUiLabels.properties?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/framework/common/config/CommonUiLabels.properties (original)
+++ ofbiz/trunk/framework/common/config/CommonUiLabels.properties Wed Jun 20 23:20:53 2007
@@ -113,6 +113,7 @@
 CommonCredit=Credit
 CommonCurrency=Currency
 CommonCurrent=Current
+CommonCurrentPassword=Current Password
 CommonDatabaseProblem=Database Problem
 CommonDate=Date
 CommonDateFilter=Date Filter
@@ -249,6 +250,8 @@
 CommonNA=N/A
 CommonName=Name
 CommonNew=New
+CommonNewPassword=New Password
+CommonNewPasswordVerify=New Password Verify
 CommonNewSelection=New Selection
 CommonNewUser=New User
 CommonNext=Next

Modified: ofbiz/trunk/framework/common/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/servicedef/services.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/framework/common/servicedef/services.xml (original)
+++ ofbiz/trunk/framework/common/servicedef/services.xml Wed Jun 20 23:20:53 2007
@@ -365,6 +365,7 @@
         <attribute name="currentPassword" type="String" mode="IN" optional="false"/>
         <attribute name="currentPasswordVerify" type="String" mode="IN" optional="false"/>
         <attribute name="passwordHint" type="String" mode="IN" optional="true"/>
+        <attribute name="requirePasswordChange" type="String" mode="IN" optional="true"/>
         <attribute name="partyId" type="String" mode="IN" optional="true"/>
     </service>
     <service name="updateUserLoginId" engine="java" location="org.ofbiz.common.login.LoginServices" invoke="updateUserLoginId" auth="true">

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java Wed Jun 20 23:20:53 2007
@@ -362,6 +362,7 @@
         String currentPasswordVerify = (String) context.get("currentPasswordVerify");
         String enabled = (String) context.get("enabled");
         String passwordHint = (String) context.get("passwordHint");
+        String requirePasswordChange = (String) context.get("requirePasswordChange");
         String errMsg = null;
 
         // security: don't create a user login if the specified partyId (if not empty) already exists
@@ -397,6 +398,7 @@
         GenericValue userLoginToCreate = delegator.makeValue("UserLogin", UtilMisc.toMap("userLoginId", userLoginId));
         userLoginToCreate.set("passwordHint", passwordHint);
         userLoginToCreate.set("enabled", enabled);
+        userLoginToCreate.set("requirePasswordChange", requirePasswordChange);
         userLoginToCreate.set("partyId", partyId);
         userLoginToCreate.set("currentPassword", useEncryption ? getPasswordHash(currentPassword) : currentPassword);
 
@@ -503,6 +505,7 @@
 
         userLoginToUpdate.set("currentPassword", useEncryption ? getPasswordHash(newPassword) : newPassword, false);
         userLoginToUpdate.set("passwordHint", passwordHint, false);
+        userLoginToUpdate.set("requirePasswordChange", "N");
 
         try {
             userLoginToUpdate.store();

Added: ofbiz/trunk/framework/common/webcommon/changePassword.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/changePassword.ftl?view=auto&rev=549406
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/changePassword.ftl (added)
+++ ofbiz/trunk/framework/common/webcommon/changePassword.ftl Wed Jun 20 23:20:53 2007
@@ -0,0 +1,59 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<#assign username = requestParameters.USERNAME?default((sessionAttributes.autoUserLogin.userLoginId)?default(""))>
+
+<div class="screenlet login-screenlet">
+  <div class="screenlet-title-bar">
+    <h3>${uiLabelMap.CommonRegistered}</h3>
+  </div>
+  <div class="screenlet-body">
+    <form method="post" action="<@ofbizUrl>login</@ofbizUrl>" name="loginform">
+      <input type="hidden" name="requirePasswordChange" value="Y"/>
+      <input type="hidden" name="USERNAME" value="${username}"/>
+      <table cellspacing="0">
+        <tr>
+          <td class="label">${uiLabelMap.CommonUsername}</td>
+          <td>${username}</td>
+        </tr>
+        <tr>
+          <td class="label">${uiLabelMap.CommonCurrentPassword}</td>
+          <td><input type="password" name="PASSWORD" value="" size="20"/></td>
+        </tr>
+        <tr>
+          <td class="label">${uiLabelMap.CommonNewPassword}</td>
+          <td><input type="password" name="newPassword" value="" size="20"/></td>
+        </tr>
+        <tr>
+          <td class="label">${uiLabelMap.CommonNewPasswordVerify}</td>
+          <td><input type="password" name="newPasswordVerify" value="" size="20"/></td>
+        </tr>
+        <tr>
+          <td colspan="2" align="center">
+            <input type="submit" value="${uiLabelMap.CommonSubmit}"/>
+          </td>
+        </tr>
+      </table>
+    </form>
+  </div>
+</div>
+
+<script language="JavaScript" type="text/javascript">
+  document.loginform.PASSWORD.focus();
+</script>

Propchange: ofbiz/trunk/framework/common/webcommon/changePassword.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/common/webcommon/changePassword.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/common/webcommon/changePassword.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml Wed Jun 20 23:20:53 2007
@@ -65,6 +65,7 @@
         <security https="true" auth="false"/>
         <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="login"/>
         <response name="success" type="view" value="main"/>
+        <response name="requirePasswordChange" type="view" value="requirePasswordChange"/>
         <response name="error" type="view" value="login"/>
     </request-map>
     <request-map uri="logout">
@@ -185,6 +186,7 @@
 
     <view-map name="main" type="screen" page="component://example/widget/example/CommonScreens.xml#main"/>
     <view-map name="login" type="screen" page="component://example/widget/example/CommonScreens.xml#login"/>
+    <view-map name="requirePasswordChange" type="screen" page="component://example/widget/example/CommonScreens.xml#requirePasswordChange"/>
 
     <view-map name="FindExample" type="screen" page="component://example/widget/example/ExampleScreens.xml#FindExample"/>
     <view-map name="EditExample" type="screen" page="component://example/widget/example/ExampleScreens.xml#EditExample"/>

Modified: ofbiz/trunk/framework/example/widget/example/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/CommonScreens.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/framework/example/widget/example/CommonScreens.xml (original)
+++ ofbiz/trunk/framework/example/widget/example/CommonScreens.xml Wed Jun 20 23:20:53 2007
@@ -162,4 +162,17 @@
             </widgets>
         </section>
     </screen>
+    <screen name="requirePasswordChange">
+        <section>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://common/webcommon/changePassword.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>

Modified: ofbiz/trunk/framework/security/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/security/entitydef/entitymodel.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/framework/security/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/framework/security/entitydef/entitymodel.xml Wed Jun 20 23:20:53 2007
@@ -69,6 +69,7 @@
       <field name="isSystem" type="indicator"></field>
       <field name="enabled" type="indicator"></field>
       <field name="hasLoggedOut" type="indicator"></field>
+      <field name="requirePasswordChange" type="indicator"></field>
       <field name="lastCurrencyUom" type="id"></field>
       <field name="lastLocale" type="very-short"></field>
       <field name="lastTimeZone" type="id-long"></field>

Modified: ofbiz/trunk/framework/shark/webapp/shark/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/shark/webapp/shark/WEB-INF/controller.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/framework/shark/webapp/shark/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/framework/shark/webapp/shark/WEB-INF/controller.xml Wed Jun 20 23:20:53 2007
@@ -59,6 +59,7 @@
         <security https="true" auth="false"/>
         <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="login"/>
         <response name="success" type="view" value="main"/>
+        <response name="requirePasswordChange" type="view" value="requirePasswordChange"/>
         <response name="error" type="view" value="login"/>
     </request-map>
 
@@ -124,6 +125,7 @@
     <view-map name="error" page="/error/error.jsp"/>
     <view-map name="main" type="screen" page="component://shark/widget/CommonScreens.xml#main"/>
     <view-map name="login" type="screen" page="component://shark/widget/CommonScreens.xml#login"/>
+    <view-map name="requirePasswordChange" type="screen" page="component://shark/widget/CommonScreens.xml#requirePasswordChange"/>
 
     <view-map name="repository" type="screen" page="component://shark/widget/RepositoryScreens.xml#showRepository"/>
     <view-map name="processList" type="screen" page="component://shark/widget/ProcessScreens.xml#processList"/>

Modified: ofbiz/trunk/framework/shark/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/shark/widget/CommonScreens.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/framework/shark/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/framework/shark/widget/CommonScreens.xml Wed Jun 20 23:20:53 2007
@@ -71,4 +71,17 @@
             </widgets>
         </section>
     </screen>
+    <screen name="requirePasswordChange">
+        <section>
+            <widgets>
+                <decorator-screen name="CommonSharkDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://common/webcommon/changePassword.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java Wed Jun 20 23:20:53 2007
@@ -51,6 +51,7 @@
 import org.ofbiz.service.GenericServiceException;
 import org.ofbiz.service.LocalDispatcher;
 import org.ofbiz.service.ModelService;
+import org.ofbiz.service.ServiceUtil;
 import org.ofbiz.webapp.stats.VisitHandler;
 import org.ofbiz.common.login.LoginServices;
 
@@ -303,11 +304,37 @@
             password = password.toLowerCase();
         }
 
+        String requirePasswordChange = request.getParameter("requirePasswordChange");
+
         // get the visit id to pass to the userLogin for history
         String visitId = VisitHandler.getVisitId(session);
 
         LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
         Map result = null;
+        if (UtilValidate.isNotEmpty(requirePasswordChange) && "Y".equals(requirePasswordChange)) {
+            Map inMap = UtilMisc.toMap("login.username", username, "login.password", password, "locale", UtilHttp.getLocale(request));
+            inMap.put("userLoginId", username);
+            inMap.put("currentPassword", password);
+            inMap.put("newPassword", request.getParameter("newPassword"));
+            inMap.put("newPasswordVerify", request.getParameter("newPasswordVerify"));
+            try {
+                result = dispatcher.runSync("updatePassword", inMap);
+            } catch (GenericServiceException e) {
+                Debug.logError(e, "Error calling updatePassword service", module);
+                Map messageMap = UtilMisc.toMap("errorMessage", e.getMessage());
+                String errMsg = UtilProperties.getMessage(resourceWebapp, "loginevents.following_error_occurred_during_login", messageMap, UtilHttp.getLocale(request));
+                request.setAttribute("_ERROR_MESSAGE_", errMsg);
+                return "error";
+            }
+            if (ServiceUtil.isError(result)) {
+                Map messageMap = UtilMisc.toMap("errorMessage", (String) result.get(ModelService.ERROR_MESSAGE));
+                String errMsg = UtilProperties.getMessage(resourceWebapp, "loginevents.following_error_occurred_during_login", messageMap, UtilHttp.getLocale(request));
+                request.setAttribute("_ERROR_MESSAGE_", errMsg);
+                return "error";
+            } else {
+                password = request.getParameter("newPassword");
+            }
+        }
 
         try {
             result = dispatcher.runSync("userLogin", UtilMisc.toMap("login.username", username, "login.password", password, "visitId", visitId, "locale", UtilHttp.getLocale(request)));
@@ -322,6 +349,9 @@
         if (ModelService.RESPOND_SUCCESS.equals(result.get(ModelService.RESPONSE_MESSAGE))) {
             GenericValue userLogin = (GenericValue) result.get("userLogin");
             Map userLoginSession = (Map) result.get("userLoginSession");
+            if (userLogin != null && "Y".equals(userLogin.getString("requirePasswordChange"))) {
+                return "requirePasswordChange";
+            }
             return doMainLogin(request, response, userLogin, userLoginSession);
         } else {
             Map messageMap = UtilMisc.toMap("errorMessage", (String) result.get(ModelService.ERROR_MESSAGE));

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml Wed Jun 20 23:20:53 2007
@@ -62,6 +62,7 @@
       <security https="true" auth="false"/>
       <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="login"/>
       <response name="success" type="view" value="main"/>
+      <response name="requirePasswordChange" type="view" value="requirePasswordChange"/>
       <response name="error" type="view" value="login"/>
     </request-map>
 
@@ -551,6 +552,7 @@
     <view-map name="error" page="/error/error.jsp"/>
     <view-map name="main" type="screen" page="component://webtools/widget/CommonScreens.xml#main"/>
     <view-map name="login" type="screen" page="component://webtools/widget/CommonScreens.xml#login"/>
+    <view-map name="requirePasswordChange" type="screen" page="component://webtools/widget/CommonScreens.xml#requirePasswordChange"/>
     <view-map name="ping" type="ftl" page="/ping.ftl"/>
     <view-map name="showDateTime" type="ftl" page="/showDateTime.ftl"/>
     

Modified: ofbiz/trunk/framework/webtools/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/CommonScreens.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/framework/webtools/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/framework/webtools/widget/CommonScreens.xml Wed Jun 20 23:20:53 2007
@@ -74,6 +74,19 @@
             </widgets>
         </section>
     </screen>
+    <screen name="requirePasswordChange">
+        <section>
+            <widgets>
+                <decorator-screen name="CommonWebtoolsDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://common/webcommon/changePassword.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
     <screen name="printStart">
         <section>
             <widgets>

Modified: ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/controller.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/controller.xml Wed Jun 20 23:20:53 2007
@@ -179,6 +179,7 @@
 
     <view-map name="main" type="screen" page="component://assetmaint/widget/FixedAssetScreens.xml#FindFixedAssets"/>
     <view-map name="login" type="screen" page="component://assetmaint/widget/CommonScreens.xml#login"/>
+    <view-map name="requirePasswordChange" type="screen" page="component://assetmaint/widget/CommonScreens.xml#requirePasswordChange"/>
 
     <!-- FixedAsset and Relationship management screens -->    
     <view-map name="FindFixedAssets" type="screen" page="component://assetmaint/widget/FixedAssetScreens.xml#FindFixedAssets" />

Modified: ofbiz/trunk/specialpurpose/assetmaint/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/widget/CommonScreens.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/assetmaint/widget/CommonScreens.xml Wed Jun 20 23:20:53 2007
@@ -73,6 +73,19 @@
             </widgets>
         </section>
     </screen>
+    <screen name="requirePasswordChange">
+        <section>
+            <widgets>
+                <decorator-screen name="main-decorator">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://common/webcommon/changePassword.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 
     <screen name="CommonFixedAssetDecorator"><!--Appbar level decorator-->
         <section>

Modified: ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/WEB-INF/controller.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/WEB-INF/controller.xml Wed Jun 20 23:20:53 2007
@@ -76,6 +76,7 @@
         <security https="true" auth="false"/>
         <event type="java" path="org.ofbiz.securityext.login.LoginEvents" invoke="storeLogin"/>
         <response name="success" type="view" value="main"/>
+        <response name="requirePasswordChange" type="view" value="login"/>
         <response name="error" type="view" value="login"/>
     </request-map>
     <request-map uri="logout">

Modified: ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/controller.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/controller.xml Wed Jun 20 23:20:53 2007
@@ -62,6 +62,7 @@
         <security https="true" auth="false"/>
         <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="login"/>
         <response name="success" type="view" value="main"/>
+        <response name="requirePasswordChange" type="view" value="login"/>
         <response name="error" type="view" value="login"/>
     </request-map>
     

Modified: ofbiz/trunk/specialpurpose/oagis/webapp/oagis/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/webapp/oagis/WEB-INF/controller.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/webapp/oagis/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/oagis/webapp/oagis/WEB-INF/controller.xml Wed Jun 20 23:20:53 2007
@@ -65,6 +65,7 @@
         <security https="true" auth="false"/>
         <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="login"/>
         <response name="success" type="view" value="main"/>
+        <response name="requirePasswordChange" type="view" value="requirePasswordChange"/>
         <response name="error" type="view" value="login"/>
     </request-map>
 
@@ -85,6 +86,7 @@
 
     <view-map name="main" type="screen" page="component://oagis/widget/CommonScreens.xml#main"/>
     <view-map name="login" type="screen" page="component://oagis/widget/CommonScreens.xml#login"/>
+    <view-map name="requirePasswordChange" type="screen" page="component://oagis/widget/CommonScreens.xml#requirePasswordChange"/>
     
     <!-- end of view mappings -->
 </site-conf>

Modified: ofbiz/trunk/specialpurpose/oagis/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/widget/CommonScreens.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/oagis/widget/CommonScreens.xml Wed Jun 20 23:20:53 2007
@@ -57,6 +57,19 @@
             </widgets>
         </section>
     </screen>
+    <screen name="requirePasswordChange">
+        <section>
+            <widgets>
+                <decorator-screen name="main-decorator">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://common/webcommon/changePassword.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
     <screen name="main">
         <section>
             <widgets>

Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml Wed Jun 20 23:20:53 2007
@@ -42,7 +42,8 @@
     <view-map name="error" page="/error/error.jsp"/>
 
     <view-map name="main" type="screen" page="component://order/widget/ordermgr/RequestScreens.xml#FindRequest"/>
-    <view-map name="login" type="screen" page="component://workeffort/widget/CommonScreens.xml#login"/>
+    <view-map name="login" type="screen" page="component://projectmgr/widget/CommonScreens.xml#login"/>
+    <view-map name="requirePasswordChange" type="screen" page="component://projectmgr/widget/CommonScreens.xml#requirePasswordChange"/>
     
     <!-- end of view mappings -->
 </site-conf>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml?view=diff&rev=549406&r1=549405&r2=549406
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml Wed Jun 20 23:20:53 2007
@@ -66,6 +66,19 @@
             </widgets>
         </section>
     </screen>
+    <screen name="requirePasswordChange">
+        <section>
+            <widgets>
+                <decorator-screen name="main-decorator">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://common/webcommon/changePassword.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 
     <screen name="CommonWorkEffortDecorator">
         <section>