Skip to content
Snippets Groups Projects
Commit 6ca32b79 authored by Rūta Giedrytė's avatar Rūta Giedrytė :seedling:
Browse files

fix teachers without edition accessing TAM

parent 1d751df1
Branches
No related tags found
1 merge request!421Teachers without edition can now also access TAM
Pipeline #1238579 passed
......@@ -8,13 +8,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- Button added to switch to dark theme. @rgiedryte
- Add HeadTA Job Offers @toberhuber @dsavvidi
- Added JobHolder and Project Entity @mmadara
### Changed
### Fixed
- Teachers without an active addition can now still see TAM @rgiedryte
## [2.2.5]
......
......@@ -197,7 +197,7 @@ public class JobOfferController {
* @return The manager page with managed editions
*/
@GetMapping("manage")
@PreAuthorize("@authorisationService.isTeacherOfAny()")
@PreAuthorize("@authorisationService.isStaff()")
public String getManagerPortal(@AuthenticatedPerson Person person,
@RequestParam(required = false) String q,
Model model) {
......
......@@ -324,7 +324,7 @@ class JobOfferControllerTest {
when(personService.getRolesForPerson(anyLong())).thenReturn(List.of(role));
when(editionService.getEditionsWithJobsAndWork(anyList())).thenReturn(editions);
when(editionService.filter(anyList(), anyString())).thenReturn(filtered);
when(authService.isTeacherOfAny()).thenReturn(true);
when(authService.isStaff()).thenReturn(true);
when(courseService.getManagingCourses(any())).thenReturn(List.of());
when(cohortService.getAllCohorts()).thenReturn(List.of());
doNothing().when(coordinatorDefaultService).addDefaultsToEditionsWithJobsAndWork(anyList());
......@@ -346,7 +346,7 @@ class JobOfferControllerTest {
@Test
@WithUserDetails("admin")
void getManagerPortalTestWithHidePrev() throws Exception {
when(authService.isTeacherOfAny()).thenReturn(true);
when(authService.isStaff()).thenReturn(true);
String q = "edi";
List<Long> editionIds = List.of();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment