Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
NvdLaan committed Feb 11, 2025
1 parent a712390 commit 7bc21f8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
4 changes: 0 additions & 4 deletions app/apps/events/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ class CaseEventsMixin:
def events(self, request, pk):
try:
case = Case.objects.get(pk=pk)
# if case.sensitive and not request.user.has_perm(
# "users.access_sensitive_dossiers"
# ):
# return Response(status=status.HTTP_403_FORBIDDEN)
except Case.DoesNotExist:
return Response(status=status.HTTP_404_NOT_FOUND)

Expand Down
33 changes: 17 additions & 16 deletions app/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,22 +104,7 @@
"OPTIONS": {"sslmode": "allow", "connect_timeout": 5},
},
}
REST_FRAMEWORK = {
"DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.LimitOffsetPagination",
"DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema",
"PAGE_SIZE": 500,
"DATETIME_FORMAT": "%Y-%m-%dT%H:%M:%S%z",
"DEFAULT_RENDERER_CLASSES": (
"rest_framework.renderers.JSONRenderer",
"rest_framework.renderers.BrowsableAPIRenderer",
),
"DEFAULT_PERMISSION_CLASSES": ("apps.users.permissions.IsInAuthorizedRealm",),
"DEFAULT_AUTHENTICATION_CLASSES": (
"apps.users.auth.AuthenticationClass",
"rest_framework.authentication.TokenAuthentication",
),
"EXCEPTION_HANDLER": "utils.exceptions.custom_exception_handler",
}

MIDDLEWARE = (
"opencensus.ext.django.middleware.OpencensusMiddleware",
"corsheaders.middleware.CorsMiddleware",
Expand Down Expand Up @@ -166,6 +151,22 @@
},
]

REST_FRAMEWORK = {
"DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.LimitOffsetPagination",
"DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema",
"PAGE_SIZE": 500,
"DATETIME_FORMAT": "%Y-%m-%dT%H:%M:%S%z",
"DEFAULT_RENDERER_CLASSES": (
"rest_framework.renderers.JSONRenderer",
"rest_framework.renderers.BrowsableAPIRenderer",
),
"DEFAULT_PERMISSION_CLASSES": ("apps.users.permissions.IsInAuthorizedRealm",),
"DEFAULT_AUTHENTICATION_CLASSES": (
"apps.users.auth.AuthenticationClass",
"rest_framework.authentication.TokenAuthentication",
),
"EXCEPTION_HANDLER": "utils.exceptions.custom_exception_handler",
}

SPECTACULAR_SETTINGS = {
"SCHEMA_PATH_PREFIX": "/api/v[0-9]/",
Expand Down

0 comments on commit 7bc21f8

Please sign in to comment.