UserList and Student List part1
Build and test backend / Build-backend (pull_request) Successful in 2m2s
Build and test backend / Test-backend (pull_request) Successful in 1m56s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 23s

This commit is contained in:
Wal committed 2024-03-17 15:59:12 +01:00
1 parent 210fda0401
commit b2d0be014c
6 files changed
+22 -76

No files matched your search

@@ -48,9 +48,9 @@ public class UserController {
}
@GetMapping("/users")
public ResponseEntity<Iterable<HashMap<String,Object>>> getAllUsers(@RequestHeader("Authorization") String authorization){
if (authServ.isNotSecretaryOrAdmin(authorization))
public ResponseEntity<Iterable<HashMap<String,Object>>> getAllUsers(@RequestHeader("authorization") String authorization){
System.out.println(authorization);
if (authServ.IsNotIn(new Role[]{Role.Admin,Role.Secretary},authorization))
return new UnauthorizedResponse<>(null);
Iterable<User> users = userService.getAll();