diff --git a/plinth/modules/api/views.py b/plinth/modules/api/views.py index ac3aff0fd..6e6f2b865 100644 --- a/plinth/modules/api/views.py +++ b/plinth/modules/api/views.py @@ -16,6 +16,8 @@ from plinth.modules import names def access_info(request: HttpRequest, **kwargs) -> HttpResponse: """API view to return a list of domains and types.""" + if not request.user.is_authenticated: + return HttpResponse(status=401) domains = [{ 'domain': domain.name, 'type': domain.domain_type.component_id