vanilla
vanilla copied to clipboard
LocalApiBulkDeleteJob violates MVC separation
https://github.com/vanilla/vanilla/blob/7cc3ce7c31e181d934514b78c6f8406f7b5c5e3a/applications/vanilla/models/class.discussionmodel.php#L3270-L3275
The way batch comment deletion by job is implemented makes the model dependent on permissions and controller endpoints.
One can no longer call DiscussionModel::deleteID to delete a discussion programatically without a session, because the API controller checks permissions again.
Ideally, the discussion model should have no knowledge about API endpoints or permissions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Still relevant.