-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix/31863: Don't allow member to edit task in room #32165
Conversation
@Ollyws Updated to cover policy expense chat. Thanks |
Reviewer Checklist
Screenshots/VideosAndroid: Native01_Android_Native.mp4Android: mWeb Chrome02_Android_Chrome.mp4iOS: Native03_iOS_Native.mp4iOS: mWeb Safari04_iOS_Safari.mp4MacOS: Chrome / Safari05_MacOS_Chrome.mp4MacOS: Desktop06_MacOS_Desktop.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to avoid adding more Onyx.connect
for functions that are used during rendering. Left a comment there, can we explore if that change can be done? 🙏
@aldo-expensify @Ollyws I updated as this comment. Please help to review again |
I am investigating how to import lodash correctly to fix lint |
@@ -149,5 +156,9 @@ export default compose( | |||
key: ({taskReportID}) => `${ONYXKEYS.COLLECTION.REPORT}${taskReportID}`, | |||
initialValue: {}, | |||
}, | |||
policy: { | |||
key: ({policyID}) => `${ONYXKEYS.COLLECTION.POLICY}${policyID || '0'}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need in this case to get the ReportUtils.getRootParentReport(report);
first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated name of props. policyID props here was already policyID of root parent report
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aldo-expensify Updated. please check again
@Ollyws @aldo-expensify Fixed lint. All yours |
@Ollyws @aldo-expensify Bump on this one |
@Ollyws please retest, web may be enough? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests well!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/aldo-expensify in version: 1.4.14-0 🚀
|
🚀 Deployed to staging by https://github.com/aldo-expensify in version: 1.4.14-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.4.14-6 🚀
|
const parentReport = ReportUtils.getParentReport(taskReport); | ||
|
||
if (policyRole && (ReportUtils.isChatRoom(parentReport) || ReportUtils.isPolicyExpenseChat(parentReport)) && policyRole !== CONST.POLICY.ROLE.ADMIN) { | ||
return false; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For non-member of workspace, policyRole
is falsy, so this condition wasn't met.
So it caused regression - #33420
Details: #33420 (comment)
Details
Don't allow member to edit task in room
Fixed Issues
$ #31863
PROPOSAL: #31863 (comment)
Tests
Offline tests
same above
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screen.Recording.2023-11-29.at.16.05.44-compressed.mov
Android: mWeb Chrome
Screen.Recording.2023-11-29.at.16.08.28-compressed.mov
iOS: Native
Screen.Recording.2023-11-29.at.16.07.03-compressed.mov
iOS: mWeb Safari
sa.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desk.mov