Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2024-03-19] [HOLD for payment 2024-03-14] [$500] IOU - An employee can access in a paid IOU the tag selection menu via a URL request #36264

Closed
5 of 6 tasks
lanitochka17 opened this issue Feb 9, 2024 · 35 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Feb 9, 2024

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


Version Number: 1.4.39-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4292715
Email or phone of affected tester (no customers): sustinov@applausemail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

Preconditions:
Set up an OldDot admin account, enable and add multiple tags, invite an employee to the policy https://sites.google.com/applausemail.com/applause-expensifyproject/wiki-guides/newdot-categories?authuser=0

  1. Open https://staging.new.expensify.com/
  2. Log in with the account of the employee added to the policy
  3. Navigate to the group policy chat room
  4. Create a manual request and send it to the WS room
  5. Open https://staging.new.expensify.com/
    in incognito mode
  6. Log in to the policy administrator account
  7. Pay the money request from the employee
  8. Go to the details of the paid IOU
  9. Click on the Tag field to display a list of available tags
  10. Copy the URL address
  11. Paste and send the copied URL in the IOU details
  12. On behalf of the employee, go to the details of the paid IOU
  13. Click on the link sent by the administrator

Expected Result:

An employee should not access in a paid IOU the tag selection menu via a URL request

Actual Result:

An employee can access in a paid IOU the tag selection menu via a URL request

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6373372_1707478590720.Recording__1318.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b368611226d91a30
  • Upwork Job ID: 1755992751668711424
  • Last Price Increase: 2024-02-09
  • Automatic offers:
    • ishpaul777 | Reviewer | 0
    • FitseTLT | Contributor | 0
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 9, 2024
@melvin-bot melvin-bot bot changed the title IOU - An employee can access in a paid IOU the tag selection menu via a URL request [$500] IOU - An employee can access in a paid IOU the tag selection menu via a URL request Feb 9, 2024
Copy link

melvin-bot bot commented Feb 9, 2024

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

Copy link

melvin-bot bot commented Feb 9, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01b368611226d91a30

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 9, 2024
Copy link

melvin-bot bot commented Feb 9, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 (External)

@lanitochka17
Copy link
Author

We think that this bug might be related to #wave6
CC @greg-schroeder

@FitseTLT
Copy link
Contributor

FitseTLT commented Feb 9, 2024

Proposal

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

An employee can access in a paid IOU the tag selection menu via a URL request

What is the root cause of that problem?

We are displaying the tag picker in IOURequestStepTag whether the user canEdit or not. We haven't used the same logic where we control the interactiveness in moneyrequest view

const canEdit = ReportUtils.canEditMoneyRequest(parentReportAction);
const canEditAmount = ReportUtils.canEditFieldOfMoneyRequest(parentReportAction, CONST.EDIT_REQUEST_FIELD.AMOUNT);

interactive={canEdit}
shouldShowRightIcon={canEdit}

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

In IOURequestStepTag when user cannot edit request we should return Not found page here

<StepScreenWrapper
headerTitle={policyTagListName}
onBackButtonPress={navigateBack}
shouldShowWrapper
testID={IOURequestStepTag.displayName}
>

    const canEdit = canEditMoneyRequest(getReportAction(report.parentReportID, report.parentReportActionID));

const canEdit = ReportUtils.canEditMoneyRequest(parentReportAction);
const canEditAmount = ReportUtils.canEditFieldOfMoneyRequest(parentReportAction, CONST.EDIT_REQUEST_FIELD.AMOUNT);

As we are controlling the interactiveness of the tag menu item in moneyrequest view
interactive={canEdit}
shouldShowRightIcon={canEdit}

We can optionally add isEditing condition too

const isEditing = action === CONST.IOU.ACTION.EDIT;
const isSplitBill = iouType === CONST.IOU.TYPE.SPLIT;

What alternative solutions did you explore? (Optional)

Alternatively we can display a message In IOURequestStepTag instead of not found page
And ofcourse we can apply similarly for category and other pages

@jeremy-croff
Copy link
Contributor

Is there any info on how to get access to https://sites.google.com/applausemail.com/applause-expensifyproject/wiki-guides/newdot-categories?authuser=0?

At the current depth I can only observe from without reproducing, It seems we want to protect the endpoint that is returning the tags initially, and have the UI handle the authorization at that level.

@melvin-bot melvin-bot bot added the Overdue label Feb 12, 2024
@ishpaul777
Copy link
Contributor

reviewing this one today

@melvin-bot melvin-bot bot removed the Overdue label Feb 12, 2024
@ishpaul777
Copy link
Contributor

ishpaul777 commented Feb 12, 2024

@jeremy-croff you can follow QA steps in #34127 to create collect policy and enable WS Room chat, then you can invite employee going to that collect workspace, enable tags and create tags, also make sure to change currency in olddot to USD

@FitseTLT your proposal looks good on a high level, but using it in IOURequestStepTag looks like this
Screenshot 2024-02-13 at 12 42 32 AM

Please update your proposal to include where you plan to put the FullPageNotFoundView

@FitseTLT
Copy link
Contributor

@ishpaul777 Here is how it looks when you make FullPageNotFoundView the top-most parent component in IOURequestStepTag
image

@ishpaul777
Copy link
Contributor

when you make FullPageNotFoundView the top-most parent component in IOURequestStepTag

Please update this within your proposal 👍

@FitseTLT
Copy link
Contributor

Updated

@ishpaul777
Copy link
Contributor

@FitseTLT Proposal looks good to me 🚀

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Feb 13, 2024

Triggered auto assignment to @neil-marcellini, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@neil-marcellini
Copy link
Contributor

@FitseTLT Proposal looks good to me 🚀

🎀 👀 🎀 C+ reviewed

I agree, the proposal to show the not found page if the user can't edit is the right approach.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 13, 2024
Copy link

melvin-bot bot commented Feb 13, 2024

📣 @ishpaul777 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Feb 13, 2024

📣 @FitseTLT 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added the Overdue label Feb 15, 2024
@ishpaul777
Copy link
Contributor

gentle bump @FitseTLT incase you didn't notice the assignment to this issue

Copy link

melvin-bot bot commented Mar 7, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Mar 7, 2024
@melvin-bot melvin-bot bot changed the title [$500] IOU - An employee can access in a paid IOU the tag selection menu via a URL request [HOLD for payment 2024-03-14] [$500] IOU - An employee can access in a paid IOU the tag selection menu via a URL request Mar 7, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 7, 2024
Copy link

melvin-bot bot commented Mar 7, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Mar 7, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.48-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-03-14. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Mar 7, 2024

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:

  • [@ishpaul777] The PR that introduced the bug has been identified. Link to the PR:
  • [@ishpaul777] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@ishpaul777] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@ishpaul777] Determine if we should create a regression test for this bug.
  • [@ishpaul777] 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.
  • [@JmillsExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

Copy link

melvin-bot bot commented Mar 11, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Mar 12, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-03-14] [$500] IOU - An employee can access in a paid IOU the tag selection menu via a URL request [HOLD for payment 2024-03-19] [HOLD for payment 2024-03-14] [$500] IOU - An employee can access in a paid IOU the tag selection menu via a URL request Mar 12, 2024
Copy link

melvin-bot bot commented Mar 12, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.50-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-03-19. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Mar 12, 2024

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:

  • [@ishpaul777] The PR that introduced the bug has been identified. Link to the PR:
  • [@ishpaul777] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@ishpaul777] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@ishpaul777] Determine if we should create a regression test for this bug.
  • [@ishpaul777] 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.
  • [@JmillsExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Mar 14, 2024
@ishpaul777
Copy link
Contributor

should be ready for payment tommorrow! will fill out checklist soon

@melvin-bot melvin-bot bot removed the Overdue label Mar 18, 2024
@JmillsExpensify
Copy link

JmillsExpensify commented Mar 19, 2024

Payment summary while we wait on the BZ checklist:

@ishpaul777
Copy link
Contributor

There was a regression payment should be halved..

@JmillsExpensify
Copy link

Thank you! Mind filling out the BZ checklist when you get a chance? Then we can issue payments. 🙌🏼

@ishpaul777
Copy link
Contributor

ishpaul777 commented Mar 19, 2024

[@ishpaul777] The PR that introduced the bug has been identified. Link to the PR: #28618
[@ishpaul777] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: #28618 (comment)
[@ishpaul777] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: not requires
[@ishpaul777] Determine if we should create a regression test for this bug. - yes
[@ishpaul777] 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.

Regression test proposal:

Preconditions:
Set up an OldDot admin account, enable and add multiple tags, invite an employee to the policy https://sites.google.com/applausemail.com/applause-expensifyproject/wiki-guides/newdot-categories?authuser=0

  1. Open Newdot
  2. Log in with the account of the employee added to the policy
  3. Navigate to the group policy chat room
  4. Create a manual request and send it to the WS room
  5. open chrome incognito mode/any other browser
  6. Log in to the policy administrator account
  7. Pay the money request from the employee
  8. Go to the details of the paid IOU
  9. Click on the Tag field to display a list of available tags
  10. Copy the URL address
  11. Paste and send the copied URL in the IOU details
  12. On behalf of the employee, go to the details of the paid IOU
  13. Click on the link sent by the administrator
  14. Verify An employee should not access in a paid IOU the tag selection menu via a deeplink and not-found page is displayed

do we agree 👍 or 👎

@JmillsExpensify
Copy link

All contributors paid via Upwork and regression test created, so I'm closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants