Added preference to control plugin usage

This commit is contained in:
Eliot Berriot 2019-09-23 17:30:20 +02:00
parent 812709ad00
commit 6f5716a128
No known key found for this signature in database
GPG Key ID: 6B501DFD73514E14
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
from dynamic_preferences import types
from dynamic_preferences.registries import global_preferences_registry
plugins = types.Section("plugins")
@global_preferences_registry.register
class PluginsEnabled(types.BooleanPreference):
section = plugins
show_in_api = True
name = "enabled"
default = True
verbose_name = "Enable Funkwhale plugins"
help_text = "If disabled, all installed and enabled plugins will be ignored."