fix: Allow sharing for shared drive recipient even if readonly#3750
fix: Allow sharing for shared drive recipient even if readonly#3750zatteo merged 1 commit intorelease/1.92.0from
Conversation
WalkthroughThe PR modifies the Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Health Improved
(1 files improve in Code Health)
Gates Passed
3 Quality Gates Passed
See analysis details in CodeScene
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| share.jsx | 9.69 → 10.00 | Complex Conditional |
Quality Gate Profile: The Bare Minimum
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
BundleMonUnchanged files (21)
Total files change -4B 0% Unchanged groups (3)
Final result: ✅ View report in BundleMon website ➡️ |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/modules/actions/share.jsx`:
- Around line 35-36: The early return when isFromSharedDriveRecipient(files[0])
is true bypasses the allLoaded and isEncryptedFileOrFolder checks; change the
branch so that for the single-file shared-drive recipient case you still require
allLoaded to be true and that isEncryptedFileOrFolder(files[0]) is false before
returning (but keep the intentional bypass of hasWriteAccess). Concretely,
replace the immediate return of !shouldHideIfSharedDriveRecipient with a
conditional that returns !shouldHideIfSharedDriveRecipient && allLoaded &&
!isEncryptedFileOrFolder(files[0]) (while leaving other logic and the
files?.length === 1 check intact).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e6967801-45db-44bd-8c36-b315e0394f69
📒 Files selected for processing (1)
src/modules/actions/share.jsx
Related to cozy/cozy-stack#4698
Summary by CodeRabbit
Release Notes