Skip to content

Commit 6745b9c

Browse files
committed
Update check for canWriteInReport
1 parent 444e11a commit 6745b9c

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/pages/inbox/report/ReportFooter.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,13 @@ function ReportFooter() {
172172
);
173173
}
174174

175-
// No specific fallback matched but the user can't write (e.g. backend returned a non-empty
176-
// permissions array without "write"). Show a neutral banner so the user isn't left with an
177-
// empty footer and no explanation. Mobile keyboard-dismiss hides the composer with
178-
// canPerformWriteAction=true, which stays on the null return.
179-
if (shouldHideComposer) {
175+
// Permissions-based lockout: the report's permissions array is non-empty and excludes both
176+
// "write" and "auditor" (e.g. "read" only via Report::inviteToRoom, donor-matching shares,
177+
// anonymous access to public rooms). Render a neutral banner so the user isn't left with an
178+
// empty footer. Other reasons the composer is hidden (creation errorFields, money-request
179+
// pending deletion, mobile keyboard dismiss) fall through to null so their more specific
180+
// indicators keep priority.
181+
if (!canWriteInReport) {
180182
return (
181183
<View style={[styles.chatFooter, styles.mt4, shouldUseNarrowLayout && styles.mb5]}>
182184
<Banner

0 commit comments

Comments
 (0)