Compare commits

..

5 Commits

Author SHA1 Message Date
53e478b05c Merge pull request 'added ApplicationController and Application enum' (#119) from Max/Backend/AppsController into master
All checks were successful
Build and test backend / Build-backend (push) Successful in 2m12s
Build and test backend / Test-backend (push) Successful in 1m19s
deploy to production / deploy-backend (push) Successful in 2m18s
Build and test FrontEnd / Build-frontend (push) Successful in 25s
deploy to production / deploy-frontend (push) Successful in 26s
Reviewed-on: #119
Reviewed-by: Debucquoy Anthony <d.tonitch@gmail.com>
Reviewed-by: Wal <karpinskiwal@gmail.com>
2024-03-16 14:51:56 +01:00
182be8ac7b
Merge branch 'master' into Max/Backend/AppsController
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 1m58s
Build and test backend / Test-backend (pull_request) Successful in 1m59s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 25s
2024-03-16 14:48:03 +01:00
abff9aef3a Merge branch 'master' into Max/Backend/AppsController
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 1m59s
Build and test backend / Test-backend (pull_request) Successful in 1m56s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 24s
2024-03-16 11:58:03 +01:00
b7b2eafb93 removed the GET /Apps/{id} frontend just iterates on the /apps list
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 2m3s
Build and test backend / Test-backend (pull_request) Successful in 2m2s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 24s
2024-03-16 00:44:11 +01:00
0860567e1b fixed the GetAuthorizedApps method
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 2m4s
Build and test backend / Test-backend (pull_request) Successful in 1m59s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 24s
2024-03-16 00:42:46 +01:00

View File

@ -46,11 +46,12 @@ public class ApplicationsController {
authorizedApps.add(Applications.Login); authorizedApps.add(Applications.Login);
authorizedApps.add(Applications.Profile); authorizedApps.add(Applications.Profile);
if (posterRole == Role.Teacher || posterRole == Role.Student || posterRole == Role.Admin){
authorizedApps.add(Applications.Msg); authorizedApps.add(Applications.Msg);
authorizedApps.add(Applications.Forum); authorizedApps.add(Applications.Forum);
authorizedApps.add(Applications.Rdv); authorizedApps.add(Applications.Rdv);
}
if (posterRole == Role.Student || posterRole == Role.Admin) return authorizedApps;
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);
@ -58,5 +59,4 @@ public class ApplicationsController {
return authorizedApps; return authorizedApps;
} }
} }