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 77b2f3e..bab7d5a 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController.java @@ -61,10 +61,17 @@ public class ApplicationsController { authorizedApps.add(Applications.Rdv); } - if (posterRole == Role.Teacher || posterRole == Role.Secretary || posterRole == Role.Admin) authorizedApps.add(Applications.ManageCourses); + if (posterRole == Role.Teacher || posterRole == Role.Secretary || posterRole == Role.Admin){ + authorizedApps.add(Applications.ManageCourses); + } - if (posterRole == Role.InscriptionService || posterRole == Role.Admin) authorizedApps.add(Applications.Inscription); + if (posterRole == Role.InscriptionService || posterRole == Role.Admin) { + authorizedApps.add(Applications.Inscription); + authorizedApps.add(Applications.StudentsList); + } + if (posterRole == Role.Secretary || posterRole == Role.Admin){ + authorizedApps.add(Applications.UsersList);} return authorizedApps; } } diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/Applications.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/Applications.java index 6ad6567..3dadcec 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/Applications.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/Applications.java @@ -15,7 +15,9 @@ public enum Applications { // teachers and Secretary authorization ManageCourses, + UsersList, // InscriptionService authorization - Inscription + Inscription, + StudentsList } diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 6414ee9..35f7f04 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -5,6 +5,22 @@ import { isLogged } from '@/rest/Users.js' import { appList, currentView } from '@/rest/apps.js' + var prevURL; + var currentURL = window.location.hash; + +window.onhashchange = function() { + prevURL = currentURL; + currentURL = window.location.hash; +} + console.log(location) +window.addEventListener('hashchange', () => { + console.log(prevURL) + console.log(location.hash) + console.log(isLogged()) + if(location.hash === "#/home" && prevURL === "#/login"){ + window.location.reload(); + } +}) const home=ref(i18n("app.home")) const notifications=ref(i18n("app.notifications")) @@ -66,7 +82,7 @@