diff --git a/smartreport/settings.py b/smartreport/settings.py index 07a8603..0245393 100644 --- a/smartreport/settings.py +++ b/smartreport/settings.py @@ -150,14 +150,14 @@ "rest_framework.authentication.BasicAuthentication", "rest_framework.authentication.SessionAuthentication", ), - # UNCOMMENT THIS TO ENABLE PERMISSIONS CHECKS - # - # 'DEFAULT_PERMISSION_CLASSES': [ - # 'smartreport_app.permissions.FullObjectPermission', - # ], 'DEFAULT_FILTER_BACKENDS': ['django_filters.rest_framework.DjangoFilterBackend'] } +if (os.environ.get("DEBUG").lower() == "false"): + REST_FRAMEWORK["DEFAULT_PERMISSION_CLASSES"] = ( + 'smartreport_app.permissions.FullObjectPermission', + ) + # Internationalization # https://docs.djangoproject.com/en/4.2/topics/i18n/