Skip to content

Commit ebd9fe3

Browse files
committed
Remove the Authentication requirement for the API access #203
1 parent 381b2a7 commit ebd9fe3

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

scancodeio/settings/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@
244244
"DEFAULT_AUTHENTICATION_CLASSES": (
245245
"rest_framework.authentication.TokenAuthentication",
246246
),
247-
"DEFAULT_PERMISSION_CLASSES": ("rest_framework.permissions.IsAuthenticated",),
247+
"DEFAULT_PERMISSION_CLASSES": ("rest_framework.permissions.AllowAny",),
248248
"DEFAULT_RENDERER_CLASSES": (
249249
"rest_framework.renderers.JSONRenderer",
250250
"rest_framework.renderers.BrowsableAPIRenderer",

scancodeio/settings/dev.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,3 @@
3939
LOGGING["loggers"]["scanner.tasks"]["handlers"] = None
4040
# Do not pollute the workspace during testing
4141
SCANCODEIO_WORKSPACE_LOCATION = tempfile.mkdtemp()
42-
else:
43-
# No API Key needed in dev mode.
44-
REST_FRAMEWORK["DEFAULT_PERMISSION_CLASSES"] = (
45-
"rest_framework.permissions.AllowAny",
46-
)

0 commit comments

Comments
 (0)