Skip to content
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

🛜 Implement Solution For Storing Post & Comment Author's IP Address in Respective Tables #891

Merged
merged 3 commits into from
Sep 10, 2024

Conversation

robin-macpherson
Copy link
Contributor

@robin-macpherson robin-macpherson commented Aug 28, 2024

Description

For security and moderation purposes, we are going to start storing the IP address of the author of posts and comments.
This will allow us to identify particular users who engage in behavior that harms other users and potentially create multiple accounts.
This will also allow us to implement IP Blocking, should those users need to be banned from the platform.

Subtasks

  • I have added this PR to the Journaly Kanban project ✅
  • Implement new getPostingIpAddress function
  • Add new postingIpAddress field to Post, Comment, and PostComment tables
  • Implement resolver code
  • Test!

Deployment Checklist

  • 🚨 Publish new j-db-client version and update in both web and j-mail
  • 🚨 Deploy migs to stage
  • 🚨 Deploy code to stage
  • 🚨 DEPLOY j-mail to stage
  • 🚨 Deploy migs to prod
  • 🚨 Deploy code to prod
  • 🚨 DEPLOY j-mail TO PROD

Migrations

  • Does the migration need to be applied before or after deploying code? Before
  • Is applying the migration going to necessitate downtime? Negative
  • Is there any SQL or backfill logic that has to be run manually? Negativo
  • Are the DB changes high risk in your estimation? Should a manual DB snapshot be taken before applying? These should be low risk. It's a new, nullable field.

Screenshots

The following screenshot shows one new comment record that has a special IP address stored (I believe this is due to it being local)

Screenshot 2024-08-28 at 20 08 23

Copy link

vercel bot commented Aug 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
journaly ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 5, 2024 4:00pm

@robin-macpherson robin-macpherson merged commit 4a9654e into master Sep 10, 2024
4 checks passed
@robin-macpherson robin-macpherson deleted the add-posting-ip-field branch September 10, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend work! database
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants