fix: proper way to test if we have a user

This commit is contained in:
David Larlet 2024-08-30 12:37:48 -04:00
parent 2a2a4be357
commit c6ebfd4363
No known key found for this signature in database
GPG key ID: 3E2953A359E7E7BD

View file

@ -339,7 +339,7 @@ class Map(NamedModel):
can = True
elif self.share_status in [self.PUBLIC, self.OPEN]:
can = True
elif request.user is None:
elif not request.user.is_authenticated:
can = False
elif request.user == self.owner:
can = True