Skip to content

[HOLD for payment 2023-07-26] [$1000] Public room bug- Page redirects to sign in page instead of relevant page (on button click) #21977

Closed

Description

@kavimuru

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

1 Create a room from user A (mobile number) in public mode
2 Go to share code and copy the link of the room
3. Open the link in Incognito mode (here incognito represents first time user)
4. Go to details and click on any button (share code, settings, Leave room) and verify if you can click on it or are redirected to sign in page

Expected Result:

Upon clicking any button on the detail page of the public room, the relevant page associated with that button should open. The user should be able to access the intended features or content of the room. If it's a feature, then the user should be forbidden from accessing the detail page.

Actual Result:

Instead of opening the relevant page associated with the button, the user is redirected to the sign-in page. This redirection prevents the user from accessing the desired content or features of the public room, causing inconvenience and hindering the intended functionality.

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.34-1
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

reply-.display.mp4
Recording.5242.mp4

Expensify/Expensify Issue URL:
Issue reported by: @avi-shek-jha
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1687822639813859

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01853fdd0f3e17fe66
  • Upwork Job ID: 1675709310305165312
  • Last Price Increase: 2023-07-03

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 30, 2023
  2. melvin-bot commented on Jun 30, 2023

    @melvin-bot

    Triggered auto assignment to @CortneyOfstad (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  3. melvin-bot commented on Jun 30, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  4. dukenv0307 commented on Jun 30, 2023

    @dukenv0307
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Public room bug- Page redirects to sign in page instead of relevant page (on button click)

    What is the root cause of that problem?

    We always redirect to the sign page if the user is anonymousUser in checkIfActionIsAllowed function

    function checkIfActionIsAllowed(callback) {

    onPress={Session.checkIfActionIsAllowed(item.action)}

    What changes do you think we should make in order to solve the problem?

    1. Add a field like the isAnonymousAction field in menuItem to know if this action is possible for anonymousUser,
    2. Add an extra field isAnonymousAction with default value false in checkIfActionIsAllowed function to prevent redirect to sign page if this action is allowed for anonymousUser
    function checkIfActionIsAllowed(callback, isAnonymousAction = false) {
      if (isAnonymousUser() && !isAnonymousAction) {
          return () => signOutAndRedirectToSignIn();
      }
      return callback;
    }
    
    1. We don't need to check checkIfActionIsAllowed here because it will be checked in MenuItem
    onPress={item.action}
    

    onPress={Session.checkIfActionIsAllowed(item.action)}

    4. Add an extra prop isAnonymousAction for MenuItem. And pass isAnonymousAction={item.isAnonymousAction || false} into MenuItem here

    onPress={Session.checkIfActionIsAllowed(item.action)}

    1. In MenuItem pass props.isAnonymousAction as second param into checkIfActionIsAllowed function

    onPress={Session.checkIfActionIsAllowed((e) => {
    if (props.disabled || !props.interactive) {
    return;
    }
    if (e && e.type === 'click') {
    e.currentTarget.blur();
    }
    props.onPress(e);
    })}

    onPress={Session.checkIfActionIsAllowed((e) => {
        if (props.disabled || !props.interactive) {
            return;
        }
    
        if (e && e.type === 'click') {
            e.currentTarget.blur();
        }
    
        props.onPress(e);
    }, props.isAnonymousAction)}
    

    What alternative solutions did you explore? (Optional)

  5. CortneyOfstad commented on Jun 30, 2023

    @CortneyOfstad
    Contributor

    Heading OoO for the week (back July 10) so re-assigning this in the meantime 👍

  6. removed their assignment
    on Jun 30, 2023
  7. added
    BugSomething is broken. Auto assigns a BugZero manager.
    and removed
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 30, 2023
  8. melvin-bot commented on Jun 30, 2023

    @melvin-bot

    Triggered auto assignment to @sophiepintoraetz (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  9. melvin-bot commented on Jun 30, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  10. sophiepintoraetz commented on Jul 3, 2023

    @sophiepintoraetz
    Contributor

    @CortneyOfstad - please can you:

    1. Keep yourself assigned
    2. Leave detailed steps as to what needs to happen next

    This SO covers it all in detail!

  11. 83 remaining items

  12. conorpendergrast commented on Aug 2, 2023

    @conorpendergrast

    @Santhosh-Sellavel Can you link me to the contract? I am not confident that Upwork will allow me to see/ interact with it, so that may need to wait until Cortney is back from OoO.

  13. conorpendergrast commented on Aug 3, 2023

    @conorpendergrast

    @Santhosh-Sellavel Bump on that contract link please!

  14. Santhosh-Sellavel commented on Aug 3, 2023

    @Santhosh-Sellavel
    Collaborator

    No worries seems the offer is withdrawn. Wait until the payment request & approval thanks!

  15. Santhosh-Sellavel commented on Aug 3, 2023

    @Santhosh-Sellavel
    Collaborator

    Requested on ND

  16. JmillsExpensify commented on Aug 4, 2023

    @JmillsExpensify
    Contributor

    Reviewed details for @Santhosh-Sellavel. These details are accurate based on summary from Business Reviewer and are now approved for payment in NewDot.

  17. conorpendergrast commented on Aug 4, 2023

    @conorpendergrast
  18. conorpendergrast commented on Aug 4, 2023

    @conorpendergrast

    @Santhosh-Sellavel I just spotted we're missing the C+ checklist here. Once that's done and any regression tests are created, we're good to close!

  19. Santhosh-Sellavel commented on Aug 4, 2023

    @Santhosh-Sellavel
    Collaborator

    BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  20. PauloGasparSv commented on Aug 7, 2023

    @PauloGasparSv
    Contributor

    This is not overdue, we had updates Friday and we are just missing the C+ checklist as mentioned above

  21. Santhosh-Sellavel commented on Aug 8, 2023

    @Santhosh-Sellavel
    Collaborator

    Bug: Anonymous actions like copy messages, share code, copy link to the room are not allowed.

    Regression Test Steps

    1. Login with any account
    2. Create a public room
    3. Go to share code and copy the link to the room
    4. Sign out and open the public room with the link above
    5. Click on the header
    6. Go to share code
    7. Verify that the share code page appears instead of redirecting to sign in page
    8. Hover any message and click on copy to clipboard
    9. Verify that the user can copy this message to clipboard and not redirect to sign page
    10. Hover on an attachment and click on download
    11. Verify that the user can download successfully

    cc: @PauloGasparSv

    👍 or 👎

  22. conorpendergrast commented on Aug 9, 2023

    @conorpendergrast
  23. conorpendergrast commented on Aug 9, 2023

    @conorpendergrast

    All done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions