openmeetings-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From solo...@apache.org
Subject svn commit: r1437442 - in /incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings: data/user/Usermanagement.java persistence/beans/user/Users.java remote/MainService.java
Date Wed, 23 Jan 2013 15:05:18 GMT
Author: solomax
Date: Wed Jan 23 15:05:18 2013
New Revision: 1437442

URL: http://svn.apache.org/viewvc?rev=1437442&view=rev
Log:
setUserObjectAndGenerateRoomHash works as expected, password is set to be not required for
external users

Modified:
    incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/user/Usermanagement.java
    incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/user/Users.java
    incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/remote/MainService.java

Modified: incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/user/Usermanagement.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/user/Usermanagement.java?rev=1437442&r1=1437441&r2=1437442&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/user/Usermanagement.java
(original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/user/Usermanagement.java
Wed Jan 23 15:05:18 2013
@@ -1061,7 +1061,7 @@ public class Usermanagement {
 
 	public Long addUserWithExternalKey(long level_id, int availible,
 			int status, String firstname, String login, String lastname,
-			long language_id, String userpass, Adresses address, Date age,
+			long language_id, boolean emptyPass, String userpass, Adresses address, Date age,
 			String hash, String externalUserId, String externalUserType,
 			boolean generateSipUserData, String email, String jNameTimeZone,
 			String pictureuri) {
@@ -1100,7 +1100,7 @@ public class Usermanagement {
 			} else {
 				users.setLanguage_id(null);
 			}
-			users.updatePassword(cryptManager, configDao, userpass);
+			users.updatePassword(cryptManager, configDao, userpass, emptyPass);
 			users.setRegdate(new Date());
 			users.setDeleted(false);
 

Modified: incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/user/Users.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/user/Users.java?rev=1437442&r1=1437441&r2=1437442&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/user/Users.java
(original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/user/Users.java
Wed Jan 23 15:05:18 2013
@@ -346,13 +346,19 @@ public class Users implements Serializab
 	}
 
 	public void updatePassword(ManageCryptStyle crypt, ConfigurationDao configDao, String pass)
throws NoSuchAlgorithmException {
-		Integer userPassMinimumLength = configDao.getConfValue("user.pass.minimum.length", Integer.class,
"4");
-
-		if (userPassMinimumLength == null) {
-			throw new RuntimeException("user.pass.minimum.length problem");
-		}
-		if (pass == null || pass.length() < userPassMinimumLength) {
-			throw new RuntimeException("Password of invalid length is provided");
+		updatePassword(crypt, configDao, pass, false);
+	}
+	
+	public void updatePassword(ManageCryptStyle crypt, ConfigurationDao configDao, String pass,
boolean empty) throws NoSuchAlgorithmException {
+		if (!empty) {
+			Integer userPassMinimumLength = configDao.getConfValue("user.pass.minimum.length", Integer.class,
"4");
+	
+			if (userPassMinimumLength == null) {
+				throw new RuntimeException("user.pass.minimum.length problem");
+			}
+			if (pass == null || pass.length() < userPassMinimumLength) {
+				throw new RuntimeException("Password of invalid length is provided");
+			}
 		}
 		String sipEnabled = configDao.getConfValue("red5sip.enable", String.class, "no");
         if("yes".equals(sipEnabled)) {

Modified: incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/remote/MainService.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/remote/MainService.java?rev=1437442&r1=1437441&r2=1437442&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/remote/MainService.java
(original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/remote/MainService.java
Wed Jan 23 15:05:18 2013
@@ -618,7 +618,8 @@ public class MainService implements IPen
 									.addUserWithExternalKey(1, 0, 0,
 											userObject.getFirstname(),
 											userObject.getUsername(),
-											userObject.getLastname(), 1L, "",
+											userObject.getLastname(), 1L,
+											true, "", // password is empty by default
 											null, null, "",
 											userObject.getExternalUserId(),
 											userObject.getExternalUserType(),



Mime
View raw message