feat: bulkdelete ban feature in forum#16
Merged
mraman-2U merged 1 commit intorelease-ulmofrom Mar 4, 2026
Merged
Conversation
jcapphelix
approved these changes
Feb 16, 2026
Collaborator
jcapphelix
left a comment
There was a problem hiding this comment.
Lgtm,
Before merging, do bump the version of forum, otherwise changes may not get reflected.
ed4b8f7 to
65b19d5
Compare
65b19d5 to
ed515cc
Compare
jcapphelix
approved these changes
Mar 4, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces a comprehensive discussion ban management system to the forum API. It adds new API endpoints, serializers, and supporting backend integrations to allow moderators to ban and unban users at both course and organization levels, view ban details, and list banned users. The changes also include the necessary serializers for input validation and output formatting, as well as updates to backend model imports and project dependencies.
Discussion Ban API Implementation:
Added new API endpoints for banning users, unbanning users, listing banned users, and retrieving ban details in
forum/urls.pyand implemented corresponding API views inforum/views/bans.py. These endpoints handle input validation, error handling, and interact with the ban management logic. [1] [2] [3] [4]Introduced serializers for ban-related operations in
forum/serializers/bans.py, includingBanUserSerializer,UnbanUserSerializer, and response serializers for consistent API input/output.API and Backend Integration:
Exposed new ban management functions (
ban_user,unban_user,get_ban,get_banned_users, etc.) inforum/api/__init__.pyfor use by the API views and other modules. [1] [2] [3] [4]Added imports for MongoDB ban-related models (
DiscussionBanExceptions,DiscussionBans,DiscussionModerationLogs) inforum/backends/mongodb/__init__.pyto support future backend operations. [1] [2]Dependencies:
django-model-utilstorequirements/base.into support model features used in ban management (such asTimeStampedModel).Merge checklist:Check off if complete or not applicable: