Skip to content
Snippets Groups Projects
Commit 0f1d662d authored by ynerant's avatar ynerant
Browse files

Anonymous users don't have any access to the API (fix it later with rights...), fix CI

parent be877276
No related branches found
No related tags found
1 merge request!56Corrections
Pipeline #7903 passed with stages
in 4 minutes and 4 seconds
...@@ -6,7 +6,7 @@ from django.db.models import F ...@@ -6,7 +6,7 @@ from django.db.models import F
from django_tables2.utils import A from django_tables2.utils import A
from .models.notes import Alias from .models.notes import Alias
from .models.transactions import Transaction, TransactionTemplate from .models.transactions import Transaction
from .templatetags.pretty_money import pretty_money from .templatetags.pretty_money import pretty_money
......
...@@ -79,5 +79,5 @@ if "logs" in INSTALLED_APPS: ...@@ -79,5 +79,5 @@ if "logs" in INSTALLED_APPS:
MIDDLEWARE += ('logs.middlewares.LogsMiddleware',) MIDDLEWARE += ('logs.middlewares.LogsMiddleware',)
if "debug_toolbar" in INSTALLED_APPS: if "debug_toolbar" in INSTALLED_APPS:
MIDDLEWARE.insert(1,"debug_toolbar.middleware.DebugToolbarMiddleware") MIDDLEWARE.insert(1, "debug_toolbar.middleware.DebugToolbarMiddleware")
INTERNAL_IPS = [ '127.0.0.1'] INTERNAL_IPS = ['127.0.0.1']
...@@ -137,7 +137,7 @@ REST_FRAMEWORK = { ...@@ -137,7 +137,7 @@ REST_FRAMEWORK = {
# or allow read-only access for unauthenticated users. # or allow read-only access for unauthenticated users.
'DEFAULT_PERMISSION_CLASSES': [ 'DEFAULT_PERMISSION_CLASSES': [
# TODO Maybe replace it with our custom permissions system # TODO Maybe replace it with our custom permissions system
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly' 'rest_framework.permissions.DjangoModelPermissions'
], ],
'DEFAULT_AUTHENTICATION_CLASSES': [ 'DEFAULT_AUTHENTICATION_CLASSES': [
'rest_framework.authentication.TokenAuthentication', 'rest_framework.authentication.TokenAuthentication',
......
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