From 0860567e1b9d0ccbb85cb7c05bcad3359e0df04a Mon Sep 17 00:00:00 2001 From: Bartha Maxime <231026@umons.ac.be> Date: Sat, 16 Mar 2024 00:42:46 +0100 Subject: [PATCH] fixed the GetAuthorizedApps method --- .../Clyde/EndPoints/ApplicationsController.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController.java index d044bf7..d5ad171 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController.java @@ -46,11 +46,12 @@ public class ApplicationsController { authorizedApps.add(Applications.LOGIN); authorizedApps.add(Applications.PROFILE); - authorizedApps.add(Applications.MSG); - authorizedApps.add(Applications.FORUM); - authorizedApps.add(Applications.RDV); - if (posterRole == Role.Student || posterRole == Role.Admin) return authorizedApps; + if (posterRole == Role.Teacher || posterRole == Role.Student || posterRole == Role.Admin){ + authorizedApps.add(Applications.MSG); + authorizedApps.add(Applications.FORUM); + authorizedApps.add(Applications.RDV); + } if (posterRole == Role.Teacher || posterRole == Role.Secretary || posterRole == Role.Admin) authorizedApps.add(Applications.MANAGECOURSES); @@ -58,5 +59,4 @@ public class ApplicationsController { return authorizedApps; } - } \ No newline at end of file