Skip to content

Add modlogs for purges by moderators#2034

Open
BentiGorlich wants to merge 2 commits intomainfrom
new/modlog-for-purge-by-moderator
Open

Add modlogs for purges by moderators#2034
BentiGorlich wants to merge 2 commits intomainfrom
new/modlog-for-purge-by-moderator

Conversation

@BentiGorlich
Copy link
Member

  • when a moderator purges content this should also be reflected in the modlog -> add new modlog types with a title property, as the entity is purged, so no longer referencable

- when a moderator purges content this should also be reflected in the modlog -> add new modlog types with a title property, as the entity is purged, so no longer referencable
@BentiGorlich BentiGorlich self-assigned this Feb 25, 2026
@BentiGorlich BentiGorlich added enhancement New feature or request api API related issues and pull requests labels Feb 25, 2026
{
$this->addSql('ALTER TABLE magazine_log ADD author_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE magazine_log ADD title VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE magazine_log ADD CONSTRAINT FK_87D3D4C5F675F31B FOREIGN KEY (author_id) REFERENCES "user" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please name the constraint and index with a meaningful name

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the doctrine generated ones. Afaik if I rename them to something else, doctrine will try to regenerate them in every diff... I can try if that it true

@blued-gear
Copy link
Collaborator

I see a potential issue with persisting the title: purging is a drastic action, so there must be reasons with it. What if the mod purged content because there was illegal content (potentially also in the title). Then it would continue existing on the server and UI which could get the server admin into legal trouble.

@BentiGorlich
Copy link
Member Author

What if the mod purged content because there was illegal content (potentially also in the title). Then it would continue existing on the server and UI which could get the server admin into legal trouble.

Yes in theory that is a problem. I could not think of a reason why you would then delete a post, but not the user. If the user was deleted the modlog would also be deleted. Maybe this has to be postponed until the moderate actions have a useful page of their own so that we can add a checkbox there whether the modlog has to be hidden (not created)

@blued-gear
Copy link
Collaborator

Maybe this has to be postponed until the moderate actions have a useful page of their own

Yea; we also have the mod-action federation issue. So we need to plan some restructuring in general.
I can approve this PR (after you checked the index name thing) and the feature can be adjusted later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api API related issues and pull requests enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants