Skip to content

feat(forum): add support for comment_role_id field#4878

Merged
wescopeland merged 2 commits into
RetroAchievements:masterfrom
wescopeland:topic-comment-role-id
May 21, 2026
Merged

feat(forum): add support for comment_role_id field#4878
wescopeland merged 2 commits into
RetroAchievements:masterfrom
wescopeland:topic-comment-role-id

Conversation

@wescopeland
Copy link
Copy Markdown
Member

@wescopeland wescopeland commented May 12, 2026

https://discord.com/channels/310192285306454017/1499468217654051137/1503387011774550116

sail artisan migrate

This PR adds a nullable comment_role_id field to forum_topics. When it's set:

  • Normal (non-staff) users may no longer comment on the forum topic - it's effectively locked for them.
  • Users with the role may reply as themselves.
  • Users with the role may reply as any team account they have access to that also has the role.
  • Moderators bypass the role gate and can still always reply.

At the moment, this can only be set on a topic by manually doing it in the database. It may be desirable in the future to make this editable in the front-end moderation controls. This is a QoL concern that I think that would more than double the size of this PR, so I decided to punt it for now.

As a QA member when the topic has comment_role_id=25
Screenshot 2026-05-12 at 7 23 01 PM

As a regular user when the topic has comment_role_id=25
Screenshot 2026-05-12 at 7 23 47 PM

@wescopeland wescopeland requested a review from a team May 12, 2026 23:24
Comment thread app/Helpers/database/forum.php
@wescopeland wescopeland merged commit 4aefd87 into RetroAchievements:master May 21, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants