[geeklog-cvs] A_and_A/server AACommandFactory.class.php,1.7,1.8 AAProviderProperties.class.php,1.2,1.3 AAServiceUser.class.php,1.6,1.7 index.php,1.1.1.1,1.2

tony at geeklog.net tony at geeklog.net
Fri Jan 10 00:56:44 EST 2003


Update of /usr/cvs/geeklog/A_and_A/server
In directory internal.geeklog.net:/tmp/cvs-serv11928

Modified Files:
	AACommandFactory.class.php AAProviderProperties.class.php 
	AAServiceUser.class.php index.php 
Log Message:
Tons of fixes.  Mostly working again

Index: AACommandFactory.class.php
===================================================================
RCS file: /usr/cvs/geeklog/A_and_A/server/AACommandFactory.class.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** AACommandFactory.class.php	28 Nov 2002 00:25:22 -0000	1.7
--- AACommandFactory.class.php	10 Jan 2003 05:56:42 -0000	1.8
***************
*** 39,43 ****
          $requestXML = stripslashes($_POST['xmlInParam']);
          /*
!         $requestXML = '<?xml version="1.0"?><AAService><ListAppGroups><AppId value="A_AND_A"></AppId><AdminUserId value="root at localhost"></AdminUserId><AdminPassword value="foo"></AdminPassword></ListAppGroups></AAService>';
          */
          $xmlParser = xml_parser_create();
--- 39,43 ----
          $requestXML = stripslashes($_POST['xmlInParam']);
          /*
!         $requestXML = '<?xml version="1.0"?><AAService><ListAppPrivileges><AppId value="A_AND_A"></AppId><AdminUserId value="root at localhost"></AdminUserId><AdminPassword value="foo"></AdminPassword></ListAppPrivileges></AAService>';
          */
          $xmlParser = xml_parser_create();

Index: AAProviderProperties.class.php
===================================================================
RCS file: /usr/cvs/geeklog/A_and_A/server/AAProviderProperties.class.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AAProviderProperties.class.php	15 Nov 2002 01:32:28 -0000	1.2
--- AAProviderProperties.class.php	10 Jan 2003 05:56:42 -0000	1.3
***************
*** 51,53 ****
  }
  
! ?>
--- 51,53 ----
  }
  
! ?>
\ No newline at end of file

Index: AAServiceUser.class.php
===================================================================
RCS file: /usr/cvs/geeklog/A_and_A/server/AAServiceUser.class.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** AAServiceUser.class.php	28 Nov 2002 00:25:43 -0000	1.6
--- AAServiceUser.class.php	10 Jan 2003 05:56:42 -0000	1.7
***************
*** 94,105 ****
          $authProvider = &AAProviderFactory::getProvider($this->_appId);
  
!         return $authProvider->changePassword($this->getAppId(), $this->getUserId(), $this->getPassword(),$newPassword);
      }
  
!     function changePasswordByAdmin($userId, $newPassword)
      {
          // Ok, because PHP can't include() packages, we need to
          // include all PHP files in the provider directory
!         if (empty($newPassword) OR empty($userId)) {
              $exception = new AAException(INSUFFICIENT_DATA_EXCEPTION);
              $exception->setMessage('either the user ID or new password was not supplied to changePasswordByAdmin()');
--- 94,105 ----
          $authProvider = &AAProviderFactory::getProvider($this->_appId);
  
!         return $authProvider->changePassword($this->getAppId(), $this->getUserName(), $this->getPassword(),$newPassword);
      }
  
!     function changePasswordByAdmin($userName, $newPassword)
      {
          // Ok, because PHP can't include() packages, we need to
          // include all PHP files in the provider directory
!         if (empty($newPassword) OR empty($userName)) {
              $exception = new AAException(INSUFFICIENT_DATA_EXCEPTION);
              $exception->setMessage('either the user ID or new password was not supplied to changePasswordByAdmin()');
***************
*** 110,114 ****
          $authProvider = &AAProviderFactory::getProvider($this->_appId);
  
!         return $authProvider->changePasswordByAdmin($this->getAppId(), $this->getUserId(), $this->getPassword(), $userId, $newPassword);
      }
  
--- 110,114 ----
          $authProvider = &AAProviderFactory::getProvider($this->_appId);
  
!         return $authProvider->changePasswordByAdmin($this->getAppId(), $this->getUserName(), $this->getPassword(), $userName, $newPassword);
      }
  
***************
*** 123,133 ****
      *
      */
!     function resetPassword($userId)
      {
!         $adminUserId = $this->getUserId();
          $adminPassword = $this->getPassword();
          $appId = $this->getAppId();
  
!         if (empty($userId) OR empty($adminUserId) OR empty($adminPassword) OR empty($appId))  {
              $exception = new AAException(INSUFFICIENT_DATA_EXCEPTION);
              $exception->setMessage('User ID was not supplied to resetPassword()');
--- 123,133 ----
      *
      */
!     function resetPassword($userName)
      {
!         $adminUserName = $this->getUserName();
          $adminPassword = $this->getPassword();
          $appId = $this->getAppId();
  
!         if (empty($userName) OR empty($adminUserName) OR empty($adminPassword) OR empty($appId))  {
              $exception = new AAException(INSUFFICIENT_DATA_EXCEPTION);
              $exception->setMessage('User ID was not supplied to resetPassword()');
***************
*** 135,139 ****
          }
          $authProvider = &AAProviderFactory::getProvider($this->_appId);
!         return $authProvider->resetPassword($this->getAppId(), $this->getUserId(), $this->getPassword(), $userId);
      }
  
--- 135,139 ----
          }
          $authProvider = &AAProviderFactory::getProvider($this->_appId);
!         return $authProvider->resetPassword($this->getAppId(), $adminUserName, $adminPassword, $userName);
      }
  
***************
*** 148,158 ****
      *
      */
!     function getUserPrivileges($userId)
      {
!         $adminUserId = $this->getUserId();
          $adminPassword = $this->getPassword();
          $appId = $this->getAppId();
  
!         if (empty($userId) OR empty($adminUserId) OR empty($adminPassword) OR empty($appId))  {
              $exception = new AAException(INSUFFICIENT_DATA_EXCEPTION);
              $exception->setMessage('User ID was not supplied to getUserPrivileges()');
--- 148,158 ----
      *
      */
!     function getUserPrivileges($userName)
      {
!         $adminUserName = $this->getUserName();
          $adminPassword = $this->getPassword();
          $appId = $this->getAppId();
  
!         if (empty($userName) OR empty($adminUserName) OR empty($adminPassword) OR empty($appId))  {
              $exception = new AAException(INSUFFICIENT_DATA_EXCEPTION);
              $exception->setMessage('User ID was not supplied to getUserPrivileges()');
***************
*** 160,173 ****
          }
          $authProvider = &AAProviderFactory::getProvider($this->_appId);
!         return $authProvider->getUserPrivileges($this->getAppId(), $this->getUserId(), $this->getPassword(), $userId);
      }
  
!     function getUserGroups($userId)
      {
!         $adminUserId = $this->getUserId();
          $adminPassword = $this->getPassword();
          $appId = $this->getAppId();
  
!         if (empty($userId) OR empty($adminUserId) OR empty($adminPassword) OR empty($appId))  {
              $exception = new AAException(INSUFFICIENT_DATA_EXCEPTION);
              $exception->setMessage('User ID was not supplied to getUserGroups()');
--- 160,173 ----
          }
          $authProvider = &AAProviderFactory::getProvider($this->_appId);
!         return $authProvider->getUserPrivileges($this->getAppId(), $this->getUserName(), $this->getPassword(), $userName);
      }
  
!     function getUserGroups($userName)
      {
!         $adminUserName = $this->getUserName();
          $adminPassword = $this->getPassword();
          $appId = $this->getAppId();
  
!         if (empty($userName) OR empty($adminUserName) OR empty($adminPassword) OR empty($appId))  {
              $exception = new AAException(INSUFFICIENT_DATA_EXCEPTION);
              $exception->setMessage('User ID was not supplied to getUserGroups()');
***************
*** 175,190 ****
          }
          $authProvider = &AAProviderFactory::getProvider($this->_appId);
!         return $authProvider->getUserGroups($this->getAppId(), $this->getUserId(), $this->getPassword(), $userId);
      }
          
!     function setUserPrivileges($userId, $privArray)
      {
!         $adminUserId = $this->getUserId();
          $adminPassword = $this->getPassword();
          $appId = $this->getAppId();
  
!         if (empty($userId) OR empty($adminUserId) OR empty($adminPassword) OR empty($appId) OR !is_array($privArray))  {
!             print "$userId, $adminUserId, $adminPassword, $appId";
!             exit;
              $exception = new AAException(INSUFFICIENT_DATA_EXCEPTION);
              $exception->setMessage('Not all parameters were passed to setUserPrivileges');
--- 175,188 ----
          }
          $authProvider = &AAProviderFactory::getProvider($this->_appId);
!         return $authProvider->getUserGroups($this->getAppId(), $this->getUserName(), $this->getPassword(), $userName);
      }
          
!     function setUserPrivileges($userName, $privArray)
      {
!         $adminUserName = $this->getUserName();
          $adminPassword = $this->getPassword();
          $appId = $this->getAppId();
  
!         if (empty($userName) OR empty($adminUserName) OR empty($adminPassword) OR empty($appId) OR !is_array($privArray))  {
              $exception = new AAException(INSUFFICIENT_DATA_EXCEPTION);
              $exception->setMessage('Not all parameters were passed to setUserPrivileges');
***************
*** 192,196 ****
          }
          $authProvider = &AAProviderFactory::getProvider($this->_appId);
!         return $authProvider->setUserPrivileges($this->getAppId(), $this->getUserId(), $this->getPassword(), $userId, $privArray);
      }
  
--- 190,194 ----
          }
          $authProvider = &AAProviderFactory::getProvider($this->_appId);
!         return $authProvider->setUserPrivileges($this->getAppId(), $this->getUserName(), $this->getPassword(), $userName, $privArray);
      }
  

Index: index.php
===================================================================
RCS file: /usr/cvs/geeklog/A_and_A/server/index.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** index.php	25 Oct 2002 22:06:42 -0000	1.1.1.1
--- index.php	10 Jan 2003 05:56:42 -0000	1.2
***************
*** 5,10 ****
  require_once('AAUtil.class.php');
  
- trigger_error('in server');
- 
  //$confFile = new AAProviderProperties('MyApp');
  $handler = new AAServiceHandler();
--- 5,8 ----





More information about the geeklog-cvs mailing list