Skip to content
Snippets Groups Projects
Commit 3c0d1653 authored by Brian Moe's avatar Brian Moe
Browse files
REST API won't allow label creation.
PUT's to /api/events/GRACEID/labels/LABELNAME fails
parent 773a2329
No related branches found
No related tags found
No related merge requests found
...@@ -18,6 +18,7 @@ import os ...@@ -18,6 +18,7 @@ import os
import urllib import urllib
import errno import errno
import shutil import shutil
import exceptions
from utils.vfile import VersionedFile from utils.vfile import VersionedFile
...@@ -116,19 +117,9 @@ def reverse(name, *args, **kw): ...@@ -116,19 +117,9 @@ def reverse(name, *args, **kw):
class LigoAuthentication(authentication.BaseAuthentication): class LigoAuthentication(authentication.BaseAuthentication):
def authenticate(self, request): def authenticate(self, request):
# XXX This might be gibberish. Esp given new LIGO.ORG auth features. # XXX This makes little sense. https://bugs.ligo.org/redmine/issues/920
#
# LIGOAuth middleware finds you from X509 cert, but raise exceptions.AuthenticationFailed("Bad user")
# Shib middleware clobbers (?) the Django user in request
# and identifies you as anonymous. Need to recover the
# Django user.
user = None
try:
if request.user.is_active:
user = request.user
except:
pass
return (user, None)
class EventSerializer(serializers.ModelSerializer): class EventSerializer(serializers.ModelSerializer):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment