mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 10:19:25 +02:00
Resolve "Per-user libraries" (use !368 instead)
This commit is contained in:
parent
b0ca181016
commit
2ea21994ee
144 changed files with 6749 additions and 5347 deletions
|
@ -56,3 +56,20 @@ class BearerTokenHeaderAuth(authentication.BaseJSONWebTokenAuthentication):
|
|||
|
||||
def authenticate_header(self, request):
|
||||
return '{0} realm="{1}"'.format("Bearer", self.www_authenticate_realm)
|
||||
|
||||
def authenticate(self, request):
|
||||
auth = super().authenticate(request)
|
||||
if auth:
|
||||
if not auth[0].actor:
|
||||
auth[0].create_actor()
|
||||
return auth
|
||||
|
||||
|
||||
class JSONWebTokenAuthentication(authentication.JSONWebTokenAuthentication):
|
||||
def authenticate(self, request):
|
||||
auth = super().authenticate(request)
|
||||
|
||||
if auth:
|
||||
if not auth[0].actor:
|
||||
auth[0].create_actor()
|
||||
return auth
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue