Fix #982: Removed "nodeinfo disabled" setting, as nodeinfo is required for the UI to work

This commit is contained in:
Eliot Berriot 2019-12-11 11:05:34 +01:00
parent dd9cca432d
commit 175d701247
No known key found for this signature in database
GPG key ID: 6B501DFD73514E14
7 changed files with 1 additions and 36 deletions

View file

@ -127,21 +127,6 @@ class RavenDSN(types.StringPreference):
field_kwargs = {"required": False}
@global_preferences_registry.register
class InstanceNodeinfoEnabled(types.BooleanPreference):
show_in_api = False
section = instance
name = "nodeinfo_enabled"
default = True
verbose_name = "Enable nodeinfo endpoint"
help_text = (
"This endpoint is needed for your about page to work. "
"It's also helpful for the various monitoring "
"tools that map and analyzize the fediverse, "
"but you can disable it completely if needed."
)
@global_preferences_registry.register
class InstanceNodeinfoPrivate(types.BooleanPreference):
show_in_api = False

View file

@ -4,7 +4,6 @@ from dynamic_preferences.registries import global_preferences_registry
from rest_framework import views
from rest_framework.response import Response
from funkwhale_api.common import preferences
from funkwhale_api.users.oauth import permissions as oauth_permissions
from . import nodeinfo
@ -38,7 +37,5 @@ class NodeInfo(views.APIView):
authentication_classes = []
def get(self, request, *args, **kwargs):
if not preferences.get("instance__nodeinfo_enabled"):
return Response(status=404)
data = nodeinfo.get()
return Response(data, status=200, content_type=NODEINFO_2_CONTENT_TYPE)