Open IuliiaHerets opened 2 months ago
Triggered auto assignment to @abekkala (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
@abekkala 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
Expense - User invited to the expense report can hold the expenses
The canHoldUnholdReportAction
function does not return the values correctly, for canHoldOrUnholdRequest
constant we haven't included (isAdmin || isActionOwner || isApprover)
check.
https://github.com/Expensify/App/blob/a37a613f8e4db14b087365dea4fb882262dbc385/src/libs/ReportUtils.ts#L3071-L3085
We have few options to resolve this:
canHoldOrUnholdRequest
constant to !isRequestSettled && !isApproved && !isDeletedParentAction && !isClosed && (isAdmin || isActionOwner || isApprover);
(isRequestIOU || canModifyStatus)
part in canHoldRequest
to (isRequestIOU && canModifyStatus)
or just remove isRequestIOU
, as it seems redundant.
https://github.com/Expensify/App/blob/a37a613f8e4db14b087365dea4fb882262dbc385/src/libs/ReportUtils.ts#L3082!isAdmin && !isApprover && !isActionOwner
is true.
if (!isAdmin && !isApprover && !isActionOwner) {
return {canHoldRequest: false, canUnholdRequest: false};
}
NOTE: Minor refactor may be required if we go with any of the solution above.
@abekkala Whoops! This issue is 2 days overdue. Let's get this updated quick!
@abekkala Huh... This is 4 days overdue. Who can take care of this?
Job added to Upwork: https://www.upwork.com/jobs/~021831812891788709823
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (External
)
Expense - User invited to the expense report can hold the expenses
The problem arises because the system currently does not properly verify if the logged-in user is the same as the creator of the expense. This results in users who did not create the expense being able to access or hold it, violating access control rules.
To fix this issue, we need to update the function responsible for opening the "hold" modal. The change will ensure that access is granted only if the email of the logged-in user matches the email of the user who created the expense.The following changes in the component should resolve the issue:
Update Access Logic: Modify the function that handles opening the hold modal to verify that the logged-in user's email matches the expense creator's email (reportAction.email).
Conditional Access: Implement conditional logic to ensure that only users with matching emails are allowed to proceed.
Following changes will fix the issue:
https://github.com/user-attachments/assets/b34f7b7a-c4e9-4a6d-a874-0f689d7c1c7d
@abekkala, @abdulrahuman5196 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@abdulrahuman5196 can you please review the proposal?
@abekkala, @abdulrahuman5196 Eep! 4 days overdue now. Issues have feelings too...
@abdulrahuman5196, do you have any comments on the proposal you've reviewed?
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@abekkala, @abdulrahuman5196 Huh... This is 4 days overdue. Who can take care of this?
Sorry for the delay. Checking now.
@abekkala The backend API to hold/unhold is also passing. @Krishna2323 solution could fix the problem in frontend but still for backend we need internal fix. Could you loop in internal engineer for this issue?
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
Looks like we'll need an internal fix first
@abekkala, @abdulrahuman5196 Huh... This is 4 days overdue. Who can take care of this?
@abekkala, @abdulrahuman5196 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
we need an internal fix first
@abekkala, @abdulrahuman5196 Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
waiting on internal - internal
and hot pick
applied
@abdulrahuman5196 @abekkala, I think we can make the frontend changes first since they are not entirely related to the backend changes. WDYT?
@abekkala, @abdulrahuman5196 12 days overdue now... This issue's end is nigh!
I think we can make the frontend changes first since they are not entirely related to the backend changes. WDYT?
Yes. I agree we can make both frontend and backend changes in parallel. Still we would need a engineer to approve that? That's why wanted to get eyes from internal engineer on this.
@Krishna2323
I think we can make the frontend changes first since they are not entirely related to the backend changes. WDYT?
Yes. I agree we can make both frontend and backend changes in parallel. Still we would need a engineer to approve that? That's why wanted to get eyes from internal engineer on this.
yes, this is correct. We are waiting for an Internal eng. to pick this one up
@abekkala, @abdulrahuman5196 Eep! 4 days overdue now. Issues have feelings too...
Not sure why the hot pick label didn't put it in that status??
@abekkala, @abdulrahuman5196 Still overdue 6 days?! Let's take care of this!
still waiting for an internal pick up on this one
as I'm going ooo until Oct 20 @OfstadC will be watching over this one until I return
Internal
/ Hot Pick
- still waiting on someone to pick up for fix. I'm not sure there will be much movement in one week.@OfstadC, @abekkala, @abdulrahuman5196 Whoops! This issue is 2 days overdue. Let's get this updated quick!
@OfstadC, @abekkala, @abdulrahuman5196 Eep! 4 days overdue now. Issues have feelings too...
still waiting for pick up
I'm back from ooo - unassigning @OfstadC
@abdulrahuman5196 @abekkala, can't we just add the C+ reviewed label so that the internal engineer is auto assigned?
@Krishna2323 no, hot picks require an internal engineer volunteer to pick up (typically someone who would be familiar with the feature) vs. an engineer being auto assigned.
@abekkala, @abdulrahuman5196 Whoops! This issue is 2 days overdue. Let's get this updated quick!
@abekkala, @abdulrahuman5196 Still overdue 6 days?! Let's take care of this!
@abekkala, @abdulrahuman5196 Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
@abekkala, @abdulrahuman5196 10 days overdue. Is anyone even seeing these? Hello?
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: v9.0.26-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: Exp https://expensify.testrail.io/index.php?/tests/view/4901045 Email or phone of affected tester (no customers): applausetester+kh050806@applause.expensifail.com Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
Invited user (User C) should not be able to hold the expenses.
Actual Result:
Invited user can hold the expenses.
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/cffc3706-c7d8-459f-a681-09cd59a9ce71
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @abdulrahuman5196