From 4c7b7fbd949f9be8edba9c5b501e206162fdb8ea Mon Sep 17 00:00:00 2001
From: Sinisa Veseli <sveseli@aps.anl.gov>
Date: Fri, 5 Feb 2016 03:10:27 +0000
Subject: [PATCH] final fixes for resolving globus online auth issue

---
 doc/RELEASE_NOTES.txt                               |  1 +
 .../dm/common/utility/ldapLinuxPlatformUtility.py   | 13 +++++++------
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/doc/RELEASE_NOTES.txt b/doc/RELEASE_NOTES.txt
index 685bcda4..b400025a 100644
--- a/doc/RELEASE_NOTES.txt
+++ b/doc/RELEASE_NOTES.txt
@@ -5,6 +5,7 @@ Release 0.8 (01/26/2016)
   processed; for uploads system can detect files that had been processed 
   already; improved handling and reporting of processing errors)
 - Source file checksum is calculated for rsync/gridftp plugins by default
+- Resolved globus online user authorization delay issue 
 
 Release 0.7 (12/08/2015)
 =============================
diff --git a/src/python/dm/common/utility/ldapLinuxPlatformUtility.py b/src/python/dm/common/utility/ldapLinuxPlatformUtility.py
index b41e3ce4..ec2581c3 100755
--- a/src/python/dm/common/utility/ldapLinuxPlatformUtility.py
+++ b/src/python/dm/common/utility/ldapLinuxPlatformUtility.py
@@ -44,13 +44,14 @@ class LdapLinuxPlatformUtility:
         if not self.adminPassword:
             raise ConfigurationError('LDAP password could not be found in %s file' % adminPasswordFile) 
         self.ldapClient = None
+        self.__configure()
 
     def __configure(self):
         cm = ConfigurationManager.getInstance()
         configItems = cm.getConfigItems(LdapLinuxPlatformUtility.CONFIG_SECTION_NAME)
-        self.logger.debug('Got config items: %s' % configItems)
+        self.getLogger().debug('Got config items: %s' % configItems)
         self.refreshAuthFilesCommand = cm.getConfigOption(LdapLinuxPlatformUtility.CONFIG_SECTION_NAME, LdapLinuxPlatformUtility.REFRESH_AUTH_FILES_COMMAND_KEY)
-        self.logger.debug('Refresh auth files command: %s' % self.refreshAuthFilesCommand)
+        self.getLogger().debug('Refresh auth files command: %s' % self.refreshAuthFilesCommand)
 
     @classmethod
     def getLogger(cls):
@@ -325,7 +326,7 @@ class LdapLinuxPlatformUtility:
         logger = self.getLogger()
         try:
             logger.debug('Refreshing auth files')
-            self.executeCommand(self.refreshAuthFilesCommand:)
+            self.executeCommand(self.refreshAuthFilesCommand)
         except Exception, ex:
             logger.warn('Failed to refresh auth files: %s' % (str(ex)))
 
@@ -334,9 +335,9 @@ class LdapLinuxPlatformUtility:
 
 if __name__ == '__main__':
     utility = LdapLinuxPlatformUtility('ldaps://dmid-vm.xray.aps.anl.gov:636', 'uid=dmadmin,ou=People,o=aps.anl.gov,dc=aps,dc=anl,dc=gov', '/tmp/ldapPassword', groupDnFormat='cn=%s,ou=DM,ou=Group,o=aps.anl.gov,dc=aps,dc=anl,dc=gov', minGidNumber=66000)
-    print utility.getGroupInfo(u'id8i-test02')
-    utility.addLocalUserToGroup(u'sveseli', u'id8i-test02')
-    print utility.getGroupInfo(u'id8i-test02')
+    print utility.getGroupInfo(u's1id-test03')
+    #utility.addLocalUserToGroup(u'sveseli', u'id8i-test02')
+    #print utility.getGroupInfo(u'id8i-test02')
     #utility.deleteLocalUserFromGroup(u'sveseli', u'id8i-test02')
     #print utility.getGroupInfo(u'id8i-test02')
 
-- 
GitLab