-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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-04-05] [$500] Task - Anonymous user can delete task in public room #37999
Comments
Triggered auto assignment to @zanyrenney ( |
@zanyrenney FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
We think that this bug might be related to #vip-vsp |
ProposalPlease re-state the problem that we are trying to solve in this issue.Anonymous user can delete task in public room What is the root cause of that problem?We call the delete task action whatever be the return value of App/src/pages/home/HeaderView.js Line 377 in f9ea69b
What changes do you think we should make in order to solve the problem?We need to update the call to: Session.checkIfActionIsAllowed(() => Task.deleteTask(props.report)); Note: We also need to do the same update to task marked as completed, because in anonymous rooms, we see don't see the delete option if the task has been marked completed, so updating both is required App/src/pages/home/HeaderView.js Lines 142 to 143 in f9ea69b
Resultsimplescreenrecorder-2024-03-09_02.55.08.mp4What alternative solutions did you explore? (Optional)I guess our actual intent should be to not display the delete option for App/src/pages/home/HeaderView.js Lines 152 to 153 in f9ea69b
For this we need to update the canModifyTask: App/src/pages/home/HeaderView.js Line 140 in f9ea69b
Update it to: const canModifyTask = Task.canModifyTask(props.report, props.session.accountID) && !Session.isAnonymousUser();
Also if the task was market as completed by the admin then when we access deeplink anonymously then we see So updating the
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Anonymous user can delete task in public room What is the root cause of that problem?We don't check if it is an anonymous user when showing the 3dot menuitem What changes do you think we should make in order to solve the problem?We should add the isAnonymousUser check to if(Session.isAnonymousUser()) {
return false;
}
AlternativelyIf we want to allow the anonymous user to see the Delete Task menuitem, we will have to:
We do this since checkIfActionIsAllowed always returns a function. We will need to call it: Session.checkIfActionIsAllowed(() => Task.deleteTask(props.report))(); ResultThis works perfectly: Screen.Recording.2024-03-08.at.11.58.26.PM.movIf we don't want the self call, we can use
|
Updated ProposalNo change in proposal at all, added result video only, can check edit history too ;) |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)
ResultScreen.Recording.2024-03-11.at.19.12.04.mov |
Adding the external label to get this resolved! |
Job added to Upwork: https://www.upwork.com/jobs/~019d7666768e954e45 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @c3024 ( |
Anyone in the design team can help confirm that, when should we display the sign in modal? When user clicks on the "Delete" option as we did with other buttons, or when user clicks on in "Confirm" button? |
Updated ProposalDid more research and found out that when the admin marks the task as completed then the delete button is removed and we get a Updated the proposal accordingly to cover this case and have added an alternative approach to avoid repeated code :)
Let me know what you think @zanyrenney @c3024 |
I think it is logical to do the check before displaying the confirmation modal. This is similar to the description and assignee fields. When we click on the description we check directly if the user is anonymous and show Sign-in page in the RHP (instead of showing description page and checking if the user is anonymous after clicking Save button on the description page). So, the proposal here by @nkdengineer looks good to me. 🎀 👀 🎀 C+ Reviewed |
Triggered auto assignment to @blimpich, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
❌ There was an error making the offer to @c3024 for the Reviewer role. The BZ member will need to manually hire the contributor. |
I also can't repro this anymore, i think we can close this one out as seems like it was solved and we're tackling any remaining issue in the issue linked above! |
@zanyrenney I still can reproduce this bug and PR is ready to review because the blocked issue is fixed |
Yeah I can still repro this, re-opening |
Merged in the open PR |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.57-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-04-05. 🎊 For reference, here are some details about the assignees on this issue:
|
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:
|
@c3024 have invited you to the job. @nkdengineer what is your upwork profile please? |
@zanyrenney thanks. Accepted the invite. |
payment summary paid @c3024 $500 via upwork. |
can't find @nkdengineer on upwork. |
Payment Summary
BugZero Checklist (@zanyrenney)
|
Not heard back from @nkdengineer still: |
@nkdengineer has not accepted the invite still. |
@zanyrenney I accepted the invitation, thanks a lot! |
payment summary |
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.49-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: N/A
Issue reported by: Applause - Internal Team
Action Performed:
)
Expected Result:
User will be presented with login modal when attempting to delete task anonymous
Actual Result:
Anonymous user can delete the task. The task is not deleted, but there is no action from preventing user to delete it
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6407175_1709916697304.20240309_004424.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: