From 36f6514a5342c0d2681cd022f3a8ca41158230e4 Mon Sep 17 00:00:00 2001
From: Sinisa Veseli <sveseli@aps.anl.gov>
Date: Mon, 13 Apr 2015 13:22:07 +0000
Subject: [PATCH] remove generic username/password from base rest api class

---
 src/python/dm/common/api/dmRestApi.py | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/src/python/dm/common/api/dmRestApi.py b/src/python/dm/common/api/dmRestApi.py
index 0c8e18c6..aa0cbc4e 100755
--- a/src/python/dm/common/api/dmRestApi.py
+++ b/src/python/dm/common/api/dmRestApi.py
@@ -15,13 +15,6 @@ class DmRestApi(DmApi):
     def __init__(self, username=None, password=None, host=None, port=None, protocol=None):
         DmApi.__init__(self)
         self.configurationManager = ConfigurationManager.getInstance()
-        if username == None and password == None:
-            username = self.configurationManager.getServiceUsername()
-            password = self.configurationManager.getServicePassword()
-        if host == None:
-            host = self.configurationManager.getServiceHost()
-        if port == None:
-            port = self.configurationManager.getServicePort()
         if protocol == None:
             protocol = self.configurationManager.getServiceProtocol()
         self.username = username
@@ -94,10 +87,10 @@ class DmRestApi(DmApi):
         """ Send authorized session request. """
         sm = self.getSessionManager()
         if not sm.hasSession():
-            if self.username == None:
-                raise AuthorizationError('Username not supplied.')
-            if self.password == None:
-                raise AuthorizationError('Password not supplied.')
+            #if self.username == None:
+            #    raise AuthorizationError('Username not supplied.')
+            #if self.password == None:
+            #    raise AuthorizationError('Password not supplied.')
             wsUrl = self.__getWebServiceUrl(url)
             # establishSession() sets the 'wsUrl' so the explicit call
             # to setHost() is not required
-- 
GitLab