don't allow non-local users to join groups (yet)

Groups are not compatible with ActivityPub because I don't know what I'm doing.

NOTE: this is super hacky, fix ASAP
This commit is contained in:
Hugh Rundle
2021-09-27 21:48:40 +10:00
parent e15eef16c5
commit fb823189a0
2 changed files with 7 additions and 2 deletions

View File

@ -84,7 +84,7 @@ class UserGroups(View):
@method_decorator(login_required, name="dispatch")
class FindUsers(View):
"""find friends to add to your group"""
"""this is mostly taken from the Get Started friend finder"""
"""this is mostly borrowed from the Get Started friend finder"""
def get(self, request, group_id):
"""basic profile info"""
@ -99,6 +99,7 @@ class FindUsers(View):
)
.filter(
similarity__gt=0.5,
local=True
)
.order_by("-similarity")[:5]
)