Skip to content
Merged

Dev #80

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion procollab/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@

SENTRY_DSN = config("SENTRY_DSN", default="", cast=str)

CSRF_TRUSTED_ORIGINS = [
"http://localhost",
"https://api.procollab.ru",
"https://procollab.ru",
"https://www.procollab.ru",
"https://app.procollab.ru",
]

ALLOWED_HOSTS = [
"127.0.0.1",
"localhost",
Expand Down Expand Up @@ -97,7 +105,6 @@

CORS_ALLOW_ALL_ORIGINS = True


INTERNAL_IPS = [
"127.0.0.1",
]
Expand Down
1 change: 1 addition & 0 deletions users/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class CustomUserAdmin(admin.ModelAdmin):
"patronymic",
"birthday",
"avatar",
"is_active",
)
},
),
Expand Down
3 changes: 2 additions & 1 deletion users/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@


class UserList(ListCreateAPIView):
queryset = User.objects.all()
# TODO: add to manager
queryset = User.objects.filter(is_active=True)
permission_classes = [AllowAny] # FIXME: change to IsAuthorized
serializer_class = UserListSerializer
filter_backends = (filters.DjangoFilterBackend,)
Expand Down