Resolve "Have an actor for our users"

This commit is contained in:
Eliot Berriot 2018-07-22 10:20:16 +00:00
parent c335e4d283
commit 6b16a8b963
17 changed files with 308 additions and 9 deletions

View file

@ -3,7 +3,7 @@ from django.conf import settings
from funkwhale_api.common import session
from . import actors, serializers
from . import serializers
VALID_RESOURCE_TYPES = ["acct"]
@ -32,9 +32,6 @@ def clean_acct(acct_string, ensure_local=True):
if ensure_local and hostname.lower() != settings.FEDERATION_HOSTNAME:
raise forms.ValidationError("Invalid hostname {}".format(hostname))
if ensure_local and username not in actors.SYSTEM_ACTORS:
raise forms.ValidationError("Invalid username")
return username, hostname