Skip to content

Commit b1dff71

Browse files
committed
DRF 기본 권한 설정
* 민감한 후원사 정보를 처리하므로, 인증된 사용자만 접근할 수 있도록 처리 * 주의: 본인것만 확인할 수 있도록 각 Viewset별 조건적용이 필요함
1 parent 7aa577b commit b1dff71

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pyconweb2022/pyconweb2022/settings.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
'django.contrib.staticfiles',
4040
'rest_framework',
4141
'sorl.thumbnail',
42+
'import_export',
4243
'sponsor',
4344
'program',
4445
]
@@ -132,3 +133,10 @@
132133
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
133134

134135
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
136+
137+
# DRF Settings
138+
REST_FRAMEWORK = {
139+
'DEFAULT_PERMISSION_CLASSES': [
140+
'rest_framework.permissions.IsAuthenticated',
141+
]
142+
}

0 commit comments

Comments
 (0)