Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Changes in intl-admin-app

Expand
titleintl-admin-app
  1. Create block status card on customer page

    1. Update users package

    2. Add isBlocked to user details type in graphql

    3. Add isBlocked to customer query in frontend

    4. Create card to display user status

  2. Create mutation to block the user

    1. Use blockUser exposed in the user package (instantiated insider the user provider)

    2. Create auditLog for the customer blocking

      1. Create new audit action block-user

      2. Example of audit log

    3. Check if the agent has permission to block

      1. TBD: which permission is needed

  3. Implement block user in front end

    1. Create confirmation modal

    2. Check if agent has permission to change customer status

      1. TBD: which permission is needed

    3. Trigger block mutation on confirmation

  4. Create mutation to unblock the user

    1. Use unblockUser exposed in the user package (instantiated insider the user provider)

    2. Create auditLog for the customer unblocking

      1. Create new audit action unblock-user

      2. Example of audit log

    3. Check if the agent has permission to unblock

      1. TBD: which permission is needed

  5. Implement unblock user in front end

    1. Create confirmation modal

    2. Check if agent has permission to change customer status

      1. TBD: which permission is needed

    3. Trigger unblock mutation on confirmation

Changes in intl-whitelable-app

Expand
titleintl-whitelable-app
  1. Create blocked account modal

  2. Handle UserBlockedError in signIn

    1. Option 1

      1. Create onError handler for signIn mutations

      2. If UserBlockedError:

        1. sign out user

        2. display blocked account modal

      3. Add onError parameter to the following signIn mutations

        1. signInWithOtp

        2. signInWithJwt

        3. signInSocialLogin

    2. Option 2

      1. Monitor error value of all the mutations listed above with useEffect

      2. If UserBlockedError:

        1. sign out user

        2. display blocked account modal

  3. Validate if user is blocked before proceeding to cart

    1. use getMe query to check user status

    2. if isBlocked

      1. sign out user

      2. display blocked account modal

Solution 2 - Disable user in cognito