You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-07-26] [$1000] Public room bug- Page redirects to sign in page instead of relevant page (on button click) #21977
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
What changes do you think we should make in order to solve the problem?
Add a field like the isAnonymousAction field in menuItem to know if this action is possible for anonymousUser,
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;
}
We don't need to check checkIfActionIsAllowed here because it will be checked in MenuItem
@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.
Reviewed details for @Santhosh-Sellavel. These details are accurate based on summary from Business Reviewer and are now approved for payment in NewDot.
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:
[@Santhosh-Sellavel] Determine if we should create a regression test for this bug. Yes
[@Santhosh-Sellavel] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again. QA Tests from the PR Looks fine
Activity
melvin-bot commentedon Jun 30, 2023
Triggered auto assignment to @CortneyOfstad (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jun 30, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)dukenv0307 commentedon Jun 30, 2023
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
checkIfActionIsAllowedfunctionApp/src/libs/actions/Session/index.js
Line 111 in d347264
App/src/pages/ReportDetailsPage.js
Line 182 in d347264
What changes do you think we should make in order to solve the problem?
isAnonymousActionfield in menuItem to know if this action is possible for anonymousUser,isAnonymousActionwith default valuefalseincheckIfActionIsAllowedfunction to prevent redirect to sign page if this action is allowed for anonymousUsercheckIfActionIsAllowedhere because it will be checked inMenuItemApp/src/pages/ReportDetailsPage.js
Line 182 in d347264
4. Add an extra prop
isAnonymousActionforMenuItem. And passisAnonymousAction={item.isAnonymousAction || false}intoMenuItemhereApp/src/pages/ReportDetailsPage.js
Line 182 in d347264
MenuItempassprops.isAnonymousActionas second param intocheckIfActionIsAllowedfunctionApp/src/components/MenuItem.js
Lines 102 to 112 in 7e908b1
What alternative solutions did you explore? (Optional)
CortneyOfstad commentedon Jun 30, 2023
Heading OoO for the week (back July 10) so re-assigning this in the meantime 👍
melvin-bot commentedon Jun 30, 2023
Triggered auto assignment to @sophiepintoraetz (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jun 30, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)sophiepintoraetz commentedon Jul 3, 2023
@CortneyOfstad - please can you:
This SO covers it all in detail!
83 remaining items
conorpendergrast commentedon Aug 2, 2023
@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.
conorpendergrast commentedon Aug 3, 2023
@Santhosh-Sellavel Bump on that contract link please!
Santhosh-Sellavel commentedon Aug 3, 2023
No worries seems the offer is withdrawn. Wait until the payment request & approval thanks!
Santhosh-Sellavel commentedon Aug 3, 2023
Requested on ND
JmillsExpensify commentedon Aug 4, 2023
Reviewed details for @Santhosh-Sellavel. These details are accurate based on summary from Business Reviewer and are now approved for payment in NewDot.
conorpendergrast commentedon Aug 4, 2023
conorpendergrast commentedon Aug 4, 2023
@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!
Santhosh-Sellavel commentedon Aug 4, 2023
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:
PauloGasparSv commentedon Aug 7, 2023
This is not overdue, we had updates Friday and we are just missing the C+ checklist as mentioned above
Santhosh-Sellavel commentedon Aug 8, 2023
Bug: Anonymous actions like copy messages, share code, copy link to the room are not allowed.
Regression Test Steps
cc: @PauloGasparSv
👍 or 👎
conorpendergrast commentedon Aug 9, 2023
Nice! Regression test created: https://github.com/Expensify/Expensify/issues/307032
conorpendergrast commentedon Aug 9, 2023
All done