Commit e2f7adf6 authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion
Browse files

Temporary remove permission for create gene

parent 1ae71133
......@@ -48,8 +48,6 @@ class GeneViewSet(ModelViewSet):
GENE_LENGTH_COL = 'length'
def get_permissions(self):
if self.action == 'create':
self.permission_classes = [IsAdminUser, ]
return super(self.__class__, self).get_permissions()
def _count_windows(self, df, window_size=10000, window_col=GENE_LENGTH_COL):
......
import environ
import datetime
root = environ.Path(__file__) - 3 # get root of the project
env = environ.Env()
......@@ -103,13 +103,19 @@ REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
'rest_framework.authentication.SessionAuthentication',
# 'rest_framework.authentication.BasicAuthentication',
),
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
'PAGE_SIZE': 100,
}
# JWT Authorization settings
JWT_AUTH = {
'JWT_EXPIRATION_DELTA': datetime.timedelta(seconds=3600)
}
# Config by .env file
DEBUG = env.bool('DEBUG', default=False)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment