Uploaded image for project: 'AdMaxLocal'
  1. AdMaxLocal
  2. AML-1132

Cannot disable a merchant using a users email

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      UI - 2.0.2 Build 28
      SAPI - Master Build 418
      Core - Trunk Build 768
      BidMgr - Trunk Build 793

    • Sprint:
      Sprint 2

      Description

      This is related to AML-1130 and AML-1129

      Using the disable-merchant.groovy script, I cannot disable the merchant using a user email, its only working with a merchant email. I'm expecting it to work with both.

      For example: running the script with -ru reseller1@thesearchagency.com gives an error and -ru testing8@jen.com works

      I'm logged into the UI with reseller1@thesearchagency.com, and looking to disable the merchant email of testing8@jen.com

      Log with error:

      [jelliott@aq-qa-tomcat1 groovy]$ groovy disable-merchant.groovy -ah http://aq-qa-tomcat1:8080/sapi/rest/ -ru reseller1@thesearchagency.com -uuid 0dcb2299-324e-42ac-80a3-2056fa00a6e5
      INFO - API Host: http://aq-qa-tomcat1:8080/sapi/rest/
      Please enter the password for admin+tsa@thesearchagency.com:
      DEBUG - Logging in as TSA Admin
      DEBUG - username = admin+tsa@thesearchagency.com, password = admin, realm alias = thesearchagency

      DEBUG - response status: HTTP/1.1 200 OK
      DEBUG - Headers: -----------
      DEBUG - Server : Apache-Coyote/1.1
      DEBUG - Expires : -1
      DEBUG - Cache-Control : no-cache
      DEBUG - Pragma : no-cache
      DEBUG - X-AML-API-ID : 536cf3b2-28fb-4216-b123-d9fb255f3203
      DEBUG - Date : Wed, 06 Feb 2013 20:20:35 GMT
      DEBUG - Content-Type : text/plain
      DEBUG - Transfer-Encoding : chunked
      DEBUG - Response data: -----
      DEBUG - X2CU34D5NWDJUB7D6CUSEIILIR4KGZLLKRZ5LVQDWNNCVNFRA4EHIECLZNE24V7PLNKEK7OXJCJRYG55EIE3WTVBQSQT3EVADNLV45FDT3H5HLZX7LIJKO5XBJ4LHIZPEFXKDV2PXQJSF3P6H2ABY3YT3FGU4C2XN7KNFYWQHM6NV5POZWAI4S357YZKI5AXUOQ5ZGOG3A46MM5ABEUKFUDJQ4MAQVFIWILYHQI=
      DEBUG - --------------------

      DEBUG - Getting realm for username 'reseller1@thesearchagency.com'
      DEBUG - TQL Query: SELECT WHERE Email == "reseller1@thesearchagency.com"

      DEBUG - response status: HTTP/1.1 200 OK
      DEBUG - Headers: -----------
      DEBUG - Server : Apache-Coyote/1.1
      DEBUG - Expires : -1
      DEBUG - Cache-Control : no-cache
      DEBUG - Pragma : no-cache
      DEBUG - X-AML-API-ID : d94754ae-2d55-47fd-b4ab-1f6c325eb0a2
      DEBUG - Date : Wed, 06 Feb 2013 20:20:35 GMT
      DEBUG - Content-Type : application/json
      DEBUG - Transfer-Encoding : chunked
      DEBUG - Response data: -----
      DEBUG - {total=2, results=[{lastName=lName, birthday=1970-01-01T01:01:01.000+0000, lastLoginDate=2013-02-06T19:56:23.000+0000, countryCode=US, workPhoneExtension=null, properties={}, homePhone=+1-111-111-1111, id=273c4aab-e844-42d1-8c5a-2063ca535bba, timezone=EST, organization=tsa, mobilePhone=+1-111-111-1111, createdBy=tsa, realm=com.reseller1, email=reseller1@thesearchagency.com, description=Principal representing the reseller1 admin user, lastModifiedBy=tsa, gender=M, lastModifiedDate=1970-01-01T01:01:01.000+0000, active=true, language=en, firstName=fName, workPhone=+1-111-111-1111, displayName=Reseller1 admin user, createdDate=1970-01-01T01:01:01.000+0000}, {lastName=lName, birthday=1970-01-01T01:01:01.000+0000, lastLoginDate=1970-01-01T01:01:01.000+0000, countryCode=US, workPhoneExtension=null, properties={}, homePhone=+1-111-111-1111, id=d42f5a21-fd27-4381-8726-1aa5194e6443, timezone=EST, organization=tsa, mobilePhone=+1-111-111-1111, createdBy=tsa, realm=com.thesearchagency, email=reseller1@thesearchagency.com, description=Principal representing a user that has forgotten their password. Each (expiring) token gives the user the ablility to hit NotificationService.sendNotification., lastModifiedBy=tsa, gender=M, lastModifiedDate=1970-01-01T01:01:01.000+0000, active=true, language=en, firstName=fName, workPhone=+1-111-111-1111, displayName=Forgot password user, createdDate=1970-01-01T01:01:01.000+0000}]}
      DEBUG - --------------------

      Caught: java.lang.AssertionError: Cannot find any user with email: reseller1@thesearchagency.com - Service should have returned exactly 1 result. Expression: (response.total == 1)
      java.lang.AssertionError: Cannot find any user with email: reseller1@thesearchagency.com - Service should have returned exactly 1 result. Expression: (response.total == 1)
      at disable-merchant.run(disable-merchant.groovy:160)

      Log that worked:

      [jelliott@aq-qa-tomcat1 groovy]$ groovy disable-merchant.groovy -ah http://aq-qa-tomcat1:8080/sapi/rest/ -ru testing8@jen.com -uuid 0dcb2299-324e-42ac-80a3-2056fa00a6e5
      INFO - API Host: http://aq-qa-tomcat1:8080/sapi/rest/
      Please enter the password for admin+tsa@thesearchagency.com:
      DEBUG - Logging in as TSA Admin
      DEBUG - username = admin+tsa@thesearchagency.com, password = admin, realm alias = thesearchagency

      DEBUG - response status: HTTP/1.1 200 OK
      DEBUG - Headers: -----------
      DEBUG - Server : Apache-Coyote/1.1
      DEBUG - Expires : -1
      DEBUG - Cache-Control : no-cache
      DEBUG - Pragma : no-cache
      DEBUG - X-AML-API-ID : f6b8affa-db03-43ae-88a9-76feee76cdfa
      DEBUG - Date : Wed, 06 Feb 2013 20:21:57 GMT
      DEBUG - Content-Type : text/plain
      DEBUG - Transfer-Encoding : chunked
      DEBUG - Response data: -----
      DEBUG - X2CU34D5NWDJUB7D6CUSEIILIR4KGZLLKRZ5LVQDWNNCVNFRA4EHIECLZNE24V7PLNKEK7OXJCJRYG55EIE3WTVBQSQT3EVADNLV45FDT3H5HLZX7LIJKO5XBJ4LHIZPEFXKDV2PXQJSF3P6H2ABY3YT3FGU4C2XN7KNFYWQHM6NV5POZWAI4S357YZKI5AXUOQ5ZGOG3A46MM5ABEUKFUDJQ4MAQVFIWILYHQI=
      DEBUG - --------------------

      DEBUG - Getting realm for username 'testing8@jen.com'
      DEBUG - TQL Query: SELECT WHERE Email == "testing8@jen.com"

      DEBUG - response status: HTTP/1.1 200 OK
      DEBUG - Headers: -----------
      DEBUG - Server : Apache-Coyote/1.1
      DEBUG - Expires : -1
      DEBUG - Cache-Control : no-cache
      DEBUG - Pragma : no-cache
      DEBUG - X-AML-API-ID : 02c8ccee-6380-4aa9-b87e-a46d546905c2
      DEBUG - Date : Wed, 06 Feb 2013 20:21:57 GMT
      DEBUG - Content-Type : application/json
      DEBUG - Transfer-Encoding : chunked
      DEBUG - Response data: -----
      DEBUG - {total=1, results=[{lastName=, birthday=null, lastLoginDate=1970-01-01T00:00:00.000+0000, countryCode=, workPhoneExtension=null, properties={}, homePhone=, id=f30730d5-24be-4ede-be7f-0d492287f1c7, timezone=, organization=, mobilePhone=, createdBy=273c4aab-e844-42d1-8c5a-2063ca535bba, realm=com.reseller1, email=testing8@jen.com, description=Merchant user for jens merchant2, lastModifiedBy=273c4aab-e844-42d1-8c5a-2063ca535bba, gender=M, lastModifiedDate=2013-02-06T19:40:07.000+0000, active=true, language=, firstName=, workPhone=78978978999, displayName=jenmer2, createdDate=2013-02-06T19:40:07.000+0000}]}
      DEBUG - --------------------

      DEBUG - Realm alias: reseller1
      DEBUG - Getting realm token: username = testing8@jen.com, realm alias = reseller1

      DEBUG - response status: HTTP/1.1 200 OK
      DEBUG - Headers: -----------
      DEBUG - Server : Apache-Coyote/1.1
      DEBUG - Expires : -1
      DEBUG - Cache-Control : no-cache
      DEBUG - Pragma : no-cache
      DEBUG - X-AML-API-ID : 21ef337d-3598-497d-92a3-e8fb382d8049
      DEBUG - Date : Wed, 06 Feb 2013 20:21:57 GMT
      DEBUG - Content-Type : text/plain
      DEBUG - Transfer-Encoding : chunked
      DEBUG - Response data: -----
      DEBUG - X2CU34D5NWDJUB7D6CUSEIILIR4KGZLLKRZ5LVXSJFCY6TX3YL62ASSIC7K7MFEZRBHFV2M7ZO6QKAREUXBI6UOJJK45JH6DB7KOWJK64FBFOLXUPSMEW2YQPILNDTNCEOFBDQW4TVZON2A7F4KQGNN2DQKDI5QV2KMUG5D76HDSUUOA22I74BH4Z63PWFZE4K2WEUO7MTVGXEDMP2E7NABTLMZY6HV6EBXRCXYPZUCAY5VVU6IQD5XAGPA54PMTV3KNYBLR2DWRCHVCKJKBT45QNE======
      DEBUG - --------------------

      DEBUG - Getting merchant with uuid '0dcb2299-324e-42ac-80a3-2056fa00a6e5'

      Feb 6, 2013 8:21:57 PM groovyx.net.http.ParserRegistry getAt
      WARNING: Cannot find parser for content-type: application/json, text/plain – using default parser.
      DEBUG - response status: HTTP/1.1 200 OK
      DEBUG - Headers: -----------
      DEBUG - Server : Apache-Coyote/1.1
      DEBUG - Expires : -1
      DEBUG - Cache-Control : no-cache
      DEBUG - Pragma : no-cache
      DEBUG - X-AML-API-ID : 520c680e-bd86-4b02-9eaa-e5da1a702b04
      DEBUG - Date : Wed, 06 Feb 2013 20:21:57 GMT
      DEBUG - Content-Type : application/json
      DEBUG - Transfer-Encoding : chunked
      DEBUG - Response data: -----
      DEBUG - {resellerId=4cdb43c1-bf60-4a59-8cdb-43c1bf60ea59, contactEmail=testing8@jen.com, contactPhoneNumber=78978978999, properties={}, url=, id=0dcb2299-324e-42ac-80a3-2056fa00a6e5, groupId=1ba385b9-1a35-446b-bae9-fdeb45adc6e6, customerId=jenmer2, phoneNumber=78978978999, createdBy=273c4aab-e844-42d1-8c5a-2063ca535bba, createdByName=Reseller1 admin user, realm=com.reseller1, contactName=jenmer2, description=, userId=f30730d5-24be-4ede-be7f-0d492287f1c7, name=jenmer2, lastModifiedBy=273c4aab-e844-42d1-8c5a-2063ca535bba, lastModifiedDate=2013-02-06T19:40:07.000+0000, active=true, lastModifiedByName=Reseller1 admin user, displayName=jens merchant2, createdDate=2013-02-06T19:40:07.000+0000, comments=}
      DEBUG - --------------------

      DEBUG - Deleting all orders for merchant 'jens merchant2'
      DEBUG - Getting all orders
      DEBUG - TQL query: SELECT WHERE associatedMerchant.id == "0dcb2299-324e-42ac-80a3-2056fa00a6e5"

      DEBUG - response status: HTTP/1.1 200 OK
      DEBUG - Headers: -----------
      DEBUG - Server : Apache-Coyote/1.1
      DEBUG - Expires : -1
      DEBUG - Cache-Control : no-cache
      DEBUG - Pragma : no-cache
      DEBUG - X-AML-API-ID : 3d339ac0-4a4d-4901-8c79-3d75449b3cac
      DEBUG - Date : Wed, 06 Feb 2013 20:21:57 GMT
      DEBUG - Content-Type : application/json
      DEBUG - Transfer-Encoding : chunked
      DEBUG - Response data: -----
      DEBUG -

      {total=0, count=0, pages=0, current=1}

      DEBUG - --------------------

      DEBUG - All orders for merchant 'jens merchant2' successfully set to DELETED or CANCELLED
      INFO - Setting jens merchant2 merchant to inactive

      Feb 6, 2013 8:21:58 PM groovyx.net.http.ParserRegistry getAt
      WARNING: Cannot find parser for content-type: application/json, text/plain – using default parser.
      DEBUG - response status: HTTP/1.1 200 OK
      DEBUG - Headers: -----------
      DEBUG - Server : Apache-Coyote/1.1
      DEBUG - Expires : -1
      DEBUG - Cache-Control : no-cache
      DEBUG - Pragma : no-cache
      DEBUG - X-AML-API-ID : 4dc02a39-bcc5-4203-a9d3-cd9f5a05bb27
      DEBUG - Date : Wed, 06 Feb 2013 20:21:57 GMT
      DEBUG - Content-Type : application/json
      DEBUG - Transfer-Encoding : chunked
      DEBUG - Response data: -----
      DEBUG -
      DEBUG - --------------------

      INFO - jens merchant2 merchant successfully set to inactive
      INFO - Getting 'jens merchant2' merchant group
      DEBUG - TQL query: SELECT WHERE Name = 'jenmer2'

      Feb 6, 2013 8:21:58 PM groovyx.net.http.ParserRegistry getAt
      WARNING: Cannot find parser for content-type: application/json, text/plain – using default parser.
      DEBUG - response status: HTTP/1.1 200 OK
      DEBUG - Headers: -----------
      DEBUG - Server : Apache-Coyote/1.1
      DEBUG - Expires : -1
      DEBUG - Cache-Control : no-cache
      DEBUG - Pragma : no-cache
      DEBUG - X-AML-API-ID : dfa4a832-711a-4290-a7ee-9712b91d18ce
      DEBUG - Date : Wed, 06 Feb 2013 20:21:57 GMT
      DEBUG - Content-Type : application/json
      DEBUG - Transfer-Encoding : chunked
      DEBUG - Response data: -----
      DEBUG - {total=1, results=[

      {id=1ba385b9-1a35-446b-bae9-fdeb45adc6e6, createdBy=273c4aab-e844-42d1-8c5a-2063ca535bba, realm=com.reseller1, description=Group for jenmer2 users, name=jenmer2, lastModifiedBy=273c4aab-e844-42d1-8c5a-2063ca535bba, active=true, lastModifiedDate=2013-02-06T19:40:07.000+0000, displayName=jens merchant2, createdDate=2013-02-06T19:40:07.000+0000}

      ]}
      DEBUG - --------------------

      DEBUG - Merchant group found, uuid: 1ba385b9-1a35-446b-bae9-fdeb45adc6e6
      INFO - Disabling all users assigned to the 'jens merchant2' merchant group
      DEBUG - Getting all users for the 'jens merchant2' merchant group

      DEBUG - response status: HTTP/1.1 200 OK
      DEBUG - Headers: -----------
      DEBUG - Server : Apache-Coyote/1.1
      DEBUG - Expires : -1
      DEBUG - Cache-Control : no-cache
      DEBUG - Pragma : no-cache
      DEBUG - X-AML-API-ID : b0cfafc5-2b70-4753-9623-cb9b89132efb
      DEBUG - Date : Wed, 06 Feb 2013 20:21:57 GMT
      DEBUG - Content-Type : application/json
      DEBUG - Transfer-Encoding : chunked
      DEBUG - Response data: -----
      DEBUG - [[f30730d5-24be-4ede-be7f-0d492287f1c7, U]]
      DEBUG - --------------------

      DEBUG - Disabling each member
      DEBUG - Disabling f30730d5-24be-4ede-be7f-0d492287f1c7

      DEBUG - response status: HTTP/1.1 200 OK
      DEBUG - Headers: -----------
      DEBUG - Server : Apache-Coyote/1.1
      DEBUG - Expires : -1
      DEBUG - Cache-Control : no-cache
      DEBUG - Pragma : no-cache
      DEBUG - X-AML-API-ID : f03db736-4633-4a03-bd8f-53237d917220
      DEBUG - Date : Wed, 06 Feb 2013 20:21:57 GMT
      DEBUG - Content-Type : application/json
      DEBUG - Transfer-Encoding : chunked
      DEBUG - Response data: -----
      DEBUG - {lastName=, birthday=null, lastLoginDate=2013-02-06T20:21:57.000+0000, countryCode=, workPhoneExtension=null, properties={}, homePhone=, id=f30730d5-24be-4ede-be7f-0d492287f1c7, timezone=, organization=, mobilePhone=, createdBy=273c4aab-e844-42d1-8c5a-2063ca535bba, realm=com.reseller1, email=testing8@jen.com, description=Merchant user for jens merchant2, lastModifiedBy=273c4aab-e844-42d1-8c5a-2063ca535bba, gender=M, lastModifiedDate=2013-02-06T19:40:07.000+0000, active=true, language=, firstName=, workPhone=78978978999, displayName=jenmer2, createdDate=2013-02-06T19:40:07.000+0000}
      DEBUG - --------------------

      DEBUG - disable-user.groovy
      DEBUG - INFO - API Host: http://aq-qa-tomcat1:8080/sapi/rest/
      INFO - Setting user testing8@jen.com to inactive

      DEBUG - response status: HTTP/1.1 200 OK
      DEBUG - Headers: -----------
      DEBUG - Server : Apache-Coyote/1.1
      DEBUG - Expires : -1
      DEBUG - Cache-Control : no-cache
      DEBUG - Pragma : no-cache
      DEBUG - X-AML-API-ID : a90b8c48-2562-4ba6-ac6c-d9b9c8beca0b
      DEBUG - Date : Wed, 06 Feb 2013 20:22:11 GMT
      DEBUG - Content-Type : text/plain
      DEBUG - Transfer-Encoding : chunked
      DEBUG - Response data: -----
      DEBUG - OK
      DEBUG - --------------------

      INFO - User testing8@jen.com successfully set to inactive
      INFO - testing8@jen.com successfully set to inactive

      DEBUG - All users in 'jens merchant2' merchant group successfully disabled
      INFO - Disabling 'jens merchant2' merchant group
      Feb 6, 2013 8:22:12 PM groovyx.net.http.ParserRegistry getAt
      WARNING: Cannot find parser for content-type: application/json, text/plain – using default parser.
      ERROR - Error disabling jens merchant2 merchant group
      ERROR - Unexpected response error: 403
      ERROR - Forbidden - Unauthorized

        Attachments

          Activity

            People

            • Assignee:
              stacie.waleyko Stacie Waleyko (Inactive)
              Reporter:
              jelliott Jen Clarke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: