Skip to content

Add new locking feature to threads/posts #38

@Xeno852

Description

@Xeno852

Implements User Story 5 #52

Resolves #XXXX

Summary

  • Added lock button component and locked status display on the topic frontend.
  • Added locked field to the Topic object in the database.
  • Edited user privileges so only topic owners, administrators, and moderators can lock or unlock a topic.
  • Added API endpoints for locking and unlocking topics.
  • Set up backend event handling for lock button clicks (event listeners).
  • Added controller functions to update the locked field given appropriate permissions.

Motivation

The ability to lock topics is essential for forum moderation and organization:

  • As a topic owner, I can prevent further replies when I no longer require assistance or when a conversation is concluded, reducing noise.
  • As a moderator or administrator, I can lock topics to prevent off-topic discussions or when forum rules are violated.

Implementing this feature enhances NodeBB's capabilities as a forum tool by providing users and staff with greater control over discussions.

Changes Made

  • No existing functionalities were edited or removed.
  • Added new locking functionality, including frontend components and backend logic.
  • Made the locking functionality more obvious and user friendly by making it a button.

Testing INCOMPLETE

Visual Testing

  • Created a new topic, verified that I could mark the new topic as unlocked

INCOMPLETE

Automated Testing

  • NONE

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions