From 37a9eb46aec030d4373df96f7d78138085fa8084 Mon Sep 17 00:00:00 2001 From: LeoMoulin Date: Sun, 17 Mar 2024 15:42:43 +0100 Subject: [PATCH] Add tests for UserController get and post --- .../main/java/ovh/herisson/Clyde/EndPoints/UserController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/UserController.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/UserController.java index 844e82e..59412c1 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/UserController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/UserController.java @@ -104,7 +104,7 @@ public class UserController { User poster = authServ.getUserFromToken(authorization); if (poster == null) return false; - return poster.getRole() == Role.Secretary && poster.getRole() == Role.Admin; + return poster.getRole() == Role.Secretary || poster.getRole() == Role.Admin; } }