From b5e04b6c995954bc4a9f90b7afa44f54c0fdec22 Mon Sep 17 00:00:00 2001 From: khansadaoudi Date: Tue, 3 Dec 2024 13:19:07 +0100 Subject: [PATCH] fix the problem of non authenticated users --- app/projects/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/projects/service.py b/app/projects/service.py index fcc6257..937856b 100644 --- a/app/projects/service.py +++ b/app/projects/service.py @@ -51,7 +51,7 @@ def check_if_project_exist(project: Project) -> None: @staticmethod def check_if_freezed(project: Project) -> None: - if project.freezed and ProjectAccessService.get_admins(project.id)[0] != current_user.username: + if project.freezed and (not current_user.is_authenticated or ProjectAccessService.get_admins(project.id)[0] != current_user.username): abort(403, "You can't access the project when it's freezed") @staticmethod