mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-14 19:56:29 +00:00
[AB-xxx] adding honeypot feature against bots
removing not necessary liquibase xsd from moderation
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package dev.sheldan.abstracto.moderation.config.feature;
|
||||
|
||||
import dev.sheldan.abstracto.core.config.FeatureConfig;
|
||||
import dev.sheldan.abstracto.core.config.FeatureDefinition;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class HoneyPotFeatureConfig implements FeatureConfig {
|
||||
|
||||
public static final String HONEYPOT_ROLE_ID = "honeypotRoleId";
|
||||
|
||||
@Override
|
||||
public FeatureDefinition getFeature() {
|
||||
return ModerationFeatureDefinition.HONEYPOT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getRequiredSystemConfigKeys() {
|
||||
return Arrays.asList(HONEYPOT_ROLE_ID);
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,8 @@ public enum ModerationFeatureDefinition implements FeatureDefinition {
|
||||
AUTOMATIC_WARN_DECAY("warnDecay"),
|
||||
USER_NOTES("userNotes"),
|
||||
REPORT_REACTIONS("reportReactions"),
|
||||
INFRACTIONS("infractions")
|
||||
INFRACTIONS("infractions"),
|
||||
HONEYPOT("honeypot")
|
||||
;
|
||||
|
||||
private final String key;
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package dev.sheldan.abstracto.moderation.model.listener;
|
||||
|
||||
import dev.sheldan.abstracto.core.models.template.display.MemberDisplay;
|
||||
import dev.sheldan.abstracto.core.models.template.display.RoleDisplay;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
public class HoneyPotReasonModel {
|
||||
private MemberDisplay memberDisplay;
|
||||
private RoleDisplay roleDisplay;
|
||||
}
|
||||
Reference in New Issue
Block a user