projects
/
htsworkflow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Initial port to python3
[htsworkflow.git]
/
htsworkflow
/
frontend
/
auth.py
diff --git
a/htsworkflow/frontend/auth.py
b/htsworkflow/frontend/auth.py
index 31650a6bb56d6189503a8e6a04d6240c8330459f..bd1771b58f1144bbded017d74d4c94c7a5d7f7be 100644
(file)
--- a/
htsworkflow/frontend/auth.py
+++ b/
htsworkflow/frontend/auth.py
@@
-4,11
+4,11
@@
Define some alternate authentication methods
from django.core.exceptions import PermissionDenied
from django.conf import settings
from django.core.exceptions import PermissionDenied
from django.conf import settings
-apidata = {'apiid':
u
'0', 'apikey': settings.DEFAULT_API_KEY}
+apidata = {'apiid': '0', 'apikey': settings.DEFAULT_API_KEY}
def require_api_key(request):
# make sure we have the api component
def require_api_key(request):
# make sure we have the api component
- if not (
request.REQUEST.has_key('apiid') or request.REQUEST.has_key('apikey')
):
+ if not (
'apiid' in request.REQUEST or 'apikey' in request.REQUEST
):
raise PermissionDenied
# make sure the id and key are right
raise PermissionDenied
# make sure the id and key are right