Skip to content

Commit

Permalink
fix the problem of non authenticated users
Browse files Browse the repository at this point in the history
  • Loading branch information
khansadaoudi committed Dec 3, 2024
1 parent 255b871 commit b5e04b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/projects/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b5e04b6

Please sign in to comment.