updated to read LDAP Credentials from RunningInstance (previuos commit was buggy)

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/social-mail-servlet@119005 82a268e6-3cf1-43bd-a215-b396298e98cf
Feature/21689
Massimiliano Assante 9 years ago
parent 4976eb3084
commit e995d59c1d

@ -111,20 +111,22 @@ public class PortalSchedulerService extends HttpServlet {
Group<Property> propGroup = found.properties();
Property[] props = (Property[]) propGroup.toArray(new Property[propGroup.size()]);
for (int j = 0; j < props.length; j++) {
_log.info("\tFound properties of " + LDAP_SERVER_NAME);
if (props[i].name().compareTo(LDAP_SERVER_FILTER_NAME) == 0) {
String encrValue = props[i].value();
if (props[j].name().compareTo(LDAP_SERVER_FILTER_NAME) == 0) {
_log.info("\tFound properties of " + LDAP_SERVER_FILTER_NAME);
String encrValue = props[j].value();
System.out.println("Filter encrypted = " + encrValue);
try {
filter = StringEncrypter.getEncrypter().decrypt( encrValue);
filter = StringEncrypter.getEncrypter().decrypt(encrValue);
} catch (Exception e) {
_log.error("Something went wrong while decrypting value for " + LDAP_SERVER_FILTER_NAME);
e.printStackTrace();
}
}
else if (props[i].name().compareTo(LDAP_SERVER_PRINCPAL_NAME) == 0) {
String encrValue = props[i].value();
else if (props[j].name().compareTo(LDAP_SERVER_PRINCPAL_NAME) == 0) {
_log.info("\tFound properties of " + LDAP_SERVER_PRINCPAL_NAME);
String encrValue = props[j].value();
try {
principal = StringEncrypter.getEncrypter().decrypt( encrValue);
principal = StringEncrypter.getEncrypter().decrypt(encrValue);
} catch (Exception e) {
_log.error("Something went wrong while decrypting value for " + LDAP_SERVER_PRINCPAL_NAME);
e.printStackTrace();

@ -52,7 +52,7 @@ public class LDAPSync implements Runnable {
List<User> users = null;
try {
users = getAllLiferayUsers();
_log.debug("\n\n\n ******** Read " + users.size() + " from LR DB\n\n");
_log.debug("\n***Read " + users.size() + " from LR DB\n");
} catch (Exception e1) {
e1.printStackTrace();
}

Loading…
Cancel
Save