mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 11:09:16 +02:00
Fix #58: enabling registrations is now done via a preference
This commit is contained in:
parent
3c1e76e95d
commit
3dd1a20b68
3 changed files with 22 additions and 12 deletions
15
api/funkwhale_api/users/dynamic_preferences_registry.py
Normal file
15
api/funkwhale_api/users/dynamic_preferences_registry.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
from dynamic_preferences import types
|
||||
from dynamic_preferences.registries import global_preferences_registry
|
||||
|
||||
users = types.Section('users')
|
||||
|
||||
|
||||
@global_preferences_registry.register
|
||||
class RegistrationEnabled(types.BooleanPreference):
|
||||
show_in_api = True
|
||||
section = users
|
||||
name = 'registration_enabled'
|
||||
default = False
|
||||
verbose_name = (
|
||||
'Can visitors open a new account on this instance?'
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue