Skip to content

Approval System for Submissions#111

Merged
ScriptRaccoon merged 12 commits intomainfrom
submission-approvals
Apr 18, 2026
Merged

Approval System for Submissions#111
ScriptRaccoon merged 12 commits intomainfrom
submission-approvals

Conversation

@ScriptRaccoon
Copy link
Copy Markdown
Owner

@ScriptRaccoon ScriptRaccoon commented Apr 18, 2026

Background

The suggestion form introduced in #49 has already been used several times and has worked well so far. Up to this point, it has only been used by people with good intentions. However, since this is the internet, I expect that this will change at some point.

To reduce the risk of abuse, several security measures were already implemented (rate limiting, IP bans, profanity filtering). However, nothing currently prevents a malicious user from submitting nonsensical content that would immediately appear as a GitHub issue.

Approval System

To solve this, this PR introduces an approval system integrated into the admin page (implemented in #108). It works as follows:

  1. When the suggestion form is submitted on a CatDat page, a new entry is created in the submissions table. This is a new table in the catdat-visits database (which should be renamed at some point), separate from the main database containing categorical data.
  2. The user is informed that their submission requires approval before publication.
message after submission
  1. The maintainer (currently me) is notified by email about the new submission.
  2. The email contains a link to /admin/submissions. This is a new page where suggestion form submissions are listed and can be reviewed.
  3. Once a submission has been approved, a GitHub issue containing its content is created.
  4. Submissions can be ignored or deleted when they are malicious, when they are duplicates, or when they are simply not relevant.

How It Looks

This is how a submission looks like before approval on the admin page.

submission before approval

After approval, it looks like this:

submission after approval

This then creates the GitHub issue #110.

Thoughts

  1. It would be much simpler if users created GitHub issues directly (authentication, ownership, transparency, etc.). However, the suggestion form appears to attract more contributions. For that reason, it is important to keep this option while making it secure.
  2. For the problem being solved here, my approach seems to be overkill. However, I could not find a simpler solution. And ...
  3. As Dmitri Pavlov suggested on zulip, it would be better to support submissions of structured data (like adding a proof, a category, etc.). Currently, the suggestion form only accepts free-form text. The system introduced in this PR could be a step in that direction.

@ScriptRaccoon ScriptRaccoon changed the title Submission approvals Approval System for Submissions Apr 18, 2026
@ScriptRaccoon ScriptRaccoon merged commit 063d576 into main Apr 18, 2026
1 check passed
@ScriptRaccoon ScriptRaccoon deleted the submission-approvals branch April 18, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant