mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 13:09:16 +02:00
Model / settings for allow-listing
This commit is contained in:
parent
1a52dfcc1d
commit
2b2b64f0a7
8 changed files with 90 additions and 1 deletions
26
api/funkwhale_api/moderation/dynamic_preferences_registry.py
Normal file
26
api/funkwhale_api/moderation/dynamic_preferences_registry.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
from dynamic_preferences import types
|
||||
from dynamic_preferences.registries import global_preferences_registry
|
||||
|
||||
moderation = types.Section("Moderation")
|
||||
|
||||
|
||||
@global_preferences_registry.register
|
||||
class AllowListEnabled(types.BooleanPreference):
|
||||
section = moderation
|
||||
name = "allow_list_enabled"
|
||||
verbose_name = "Enable allow-listing"
|
||||
help_text = "If enabled, only interactions with explicitely allowed domains will be authorized."
|
||||
default = False
|
||||
|
||||
|
||||
@global_preferences_registry.register
|
||||
class AllowListPublic(types.BooleanPreference):
|
||||
section = moderation
|
||||
name = "allow_list_public"
|
||||
verbose_name = "Publish your allowed-domains list"
|
||||
help_text = (
|
||||
"If enabled, everyone will be able to retrieve the list of domains you allowed. ",
|
||||
"This is useful on open setups, to help people decide if they want to join your pod, or to "
|
||||
"make your moderation policy public.",
|
||||
)
|
||||
default = False
|
Loading…
Add table
Add a link
Reference in a new issue