Repository navigation
feat(moderation): implement resource moderation queue and author deletions #395
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
Open
trtajim
wants to merge
15
commits into
main
Choose a base branch
from
feat/allow-authors-to-delete-own-resources
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
bd9b7c8
feat(resources): allow authors to delete their own resources
trtajim 0d8e246
feat(moderation): add resource_change_requests schema and model
trtajim ffbbbd2
feat(moderation): route resource actions into moderation queue with e…
trtajim feea8fd
refactor(moderation): simplify record signatures by embedding file_pa…
trtajim 6912169
feat(moderation): add moderate resources permission migration and seeder
trtajim 2d4e267
feat(moderation): add ResourceModerationController routes, nav link, …
trtajim 0882853
feat(moderation): add moderation review page and pending badges in re…
trtajim 6b242ca
fix(moderation): assign node_id and user_id when approving create req…
trtajim 1ec21b6
feat(user): send goodbye email with feature highlights when admin del…
trtajim 1cddcc8
Revert "feat(user): send goodbye email with feature highlights when a…
trtajim eb6f04f
Merge remote-tracking branch 'origin/main' into feat/allow-authors-to…
trtajim 25ed0b0
feat(moderation): improve moderation image diff, bulk reject, and nod…
trtajim 8f8e153
feat(admin): display pending resource uploads in node view with previ…
trtajim 3f7e75c
fix(storage): protect pending resource change request files during cl…
trtajim 285cd10
feat(resources): limit pending submissions per user and display in-mo…
trtajim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
The pending-request check has a race, and the update overwrites unrelated fields.
Two requests sent at the same time can both pass the
exists()check. The resource then gets two pending requests.hasOneshows only one of them, and approving both applies the changes in an undefined order.sanitizePayloadalso stores missing keys asnull, for examplecontent. On approval,$resource->update($payload)then clears fields the author did not send. Lock the resource row withlockForUpdateinside a transaction, or add a unique partial constraint. When building the update, drop null keys that the request did not send.🤖 Prompt for AI Agents