svn commit: r1142908 - in /ofbiz/trunk: applications/party/src/org/ofbiz/party/party/PartyServices.java framework/common/src/org/ofbiz/common/login/LoginServices.java

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

svn commit: r1142908 - in /ofbiz/trunk: applications/party/src/org/ofbiz/party/party/PartyServices.java framework/common/src/org/ofbiz/common/login/LoginServices.java

hansbak-2
Author: hansbak
Date: Tue Jul  5 07:18:54 2011
New Revision: 1142908

URL: http://svn.apache.org/viewvc?rev=1142908&view=rev
Log:
currently it is pretty difficult to disable a userlogin by setting the deleted date to a date in the future and enable=N, further when disable a party tries to disable related userlogins but does not set that future date. This change will allow to nullify the deleted date so it is now clear the userlogin will never be enabled. The deleted date is still available in the last modified date.

Modified:
    ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
    ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java

Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java?rev=1142908&r1=1142907&r2=1142908&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java Tue Jul  5 07:18:54 2011
@@ -249,7 +249,6 @@ public class PartyServices {
                     for(GenericValue userLogin : userLogins) {
                         if (!"N".equals(userLogin.getString("enabled"))) {
                             userLogin.set("enabled", "N");
-                            userLogin.set("disabledDateTime", UtilDateTime.nowTimestamp());
                             userLogin.store();
                         }
                     }

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?rev=1142908&r1=1142907&r2=1142908&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java Tue Jul  5 07:18:54 2011
@@ -888,11 +888,6 @@ public class LoginServices {
             userLoginToUpdate.set("disabledDateTime", null);
         }
 
-        // if was enabled and we are disabling it, and no disabledDateTime was passed, set it to now
-        if (wasEnabled && "N".equals(context.get("enabled")) && context.get("disabledDateTime") == null) {
-            userLoginToUpdate.set("disabledDateTime", UtilDateTime.nowTimestamp());
-        }
-
         try {
             userLoginToUpdate.store();
         } catch (GenericEntityException e) {