Skip to content

Commit 121de51

Browse files
throw error again after interception
1 parent 89c9b92 commit 121de51

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/de/tum/cit/aet/artemis/programming/service/localvc/LocalVCServletService.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import org.springframework.beans.factory.annotation.Value;
3333
import org.springframework.context.annotation.Profile;
3434
import org.springframework.http.HttpStatus;
35-
import org.springframework.security.access.AccessDeniedException;
3635
import org.springframework.security.authentication.AuthenticationManager;
3736
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
3837
import org.springframework.security.core.AuthenticationException;
@@ -264,7 +263,7 @@ public void authenticateAndAuthorizeGitRequest(HttpServletRequest request, Repos
264263
catch (LocalVCForbiddenException e) {
265264
log.error("User {} does not have access to the repository {}", user.getLogin(), localVCRepositoryUri);
266265
saveFailedAccessVcsAccessLog(Optional.of(request), Optional.empty(), repositoryTypeOrUserName, exercise, localVCRepositoryUri, user, repositoryAction);
267-
throw new AccessDeniedException("User does not have access to this repository", e);
266+
throw e;
268267
}
269268

270269
log.debug("Authorizing user {} for repository {} took {}", user.getLogin(), localVCRepositoryUri, TimeLogUtil.formatDurationFrom(timeNanoStart));

0 commit comments

Comments
 (0)