mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 13:09:16 +02:00
Blacked the code
This commit is contained in:
parent
b6fc0051fa
commit
62ca3bd736
279 changed files with 8861 additions and 9527 deletions
|
@ -11,11 +11,13 @@ class HasUserPermission(BasePermission):
|
|||
permission_classes = [HasUserPermission]
|
||||
required_permissions = ['federation']
|
||||
"""
|
||||
|
||||
def has_permission(self, request, view):
|
||||
if not hasattr(request, 'user') or not request.user:
|
||||
if not hasattr(request, "user") or not request.user:
|
||||
return False
|
||||
if request.user.is_anonymous:
|
||||
return False
|
||||
operator = getattr(view, 'permission_operator', 'and')
|
||||
operator = getattr(view, "permission_operator", "and")
|
||||
return request.user.has_permissions(
|
||||
*view.required_permissions, operator=operator)
|
||||
*view.required_permissions, operator=operator
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue