update: The interface for ordinary users to view resources has been r…#2018
update: The interface for ordinary users to view resources has been r…#2018zyd123-cmd wants to merge 1 commit intoweb3infra-foundation:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f9add84d96
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| // key by note.id in order to reset tiptap editor state | ||
| key={note.id} | ||
| note={note} | ||
| note={{ ...note, viewer_can_edit: hasWritePermission }} |
There was a problem hiding this comment.
Propagate effective write permission to all note actions
This only patches viewer_can_edit for NoteEditor, while InnerNoteView still passes the original note into NoteBreadcrumbs and NoteTrailingAccessory, both of which gate share/move/delete affordances off note.viewer_can_edit via downstream components. In the exact mismatch case you now surface (!hasWritePermission && note.viewer_can_edit), users are told the doc is read-only but can still open edit-capable menus and trigger mutations that should be blocked, creating inconsistent and error-prone behavior; the effective permission should be applied consistently across the whole note view.
Useful? React with 👍 / 👎.
No description provided.