|
@@ -38,11 +38,8 @@ class SnippetUSER(APIView):
|
|
serializer = UserSerializer(snippets, many=True, context={'request': request})
|
|
serializer = UserSerializer(snippets, many=True, context={'request': request})
|
|
try:
|
|
try:
|
|
header_key = request.META["HTTP_X_API_KEY"]
|
|
header_key = request.META["HTTP_X_API_KEY"]
|
|
|
|
+ db_key = APIKey.objects.get_from_key(header_key)
|
|
|
|
+ print(db_key.has_permission_method("user", "get"))
|
|
except:
|
|
except:
|
|
header_key = request.META["HTTP_X_CSRFTOKEN"]
|
|
header_key = request.META["HTTP_X_CSRFTOKEN"]
|
|
- db_key = APIKey.objects.get_from_key(header_key)
|
|
|
|
- #print(db_key.permission.all())
|
|
|
|
- print(db_key.has_permission("user"))
|
|
|
|
- print(db_key.has_permission_method("user", "add"))
|
|
|
|
- #print(header_key.permission)
|
|
|
|
return Response(serializer.data)
|
|
return Response(serializer.data)
|