Skip to content

Commit

Permalink
fixing dashboad permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
siewer committed Jul 8, 2024
1 parent 403a407 commit c984a74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public ResponseEntity<SessionOwner> getSesstionOwner(HttpServletRequest request)
return dashboardService.getSessionOwner(request.getUserPrincipal().getName());

}
@PreAuthorize("hasAuthority('ROLE_ADMIN')")
@PreAuthorize("hasAuthority('ROLE_USER')")
@GetMapping(value = "/stat")
public ResponseEntity<DashboardStat> getDashboardStat(){
return dashboardService.getDashboardStat();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ private void setGitRepositoryForProject(Scanner scanner, CodeProject codeProject
String passwordString = getPasswordStringForCodeProejct(codeProject);
HttpEntity<CxSetGitRepo> cxSetGitRepoHttpEntity = new HttpEntity<>(new CxSetGitRepo(codeProject, passwordString), codeRequestHelper.getHttpEntity().getHeaders());
ObjectMapper mapper = new ObjectMapper();
log.info("[Checkmarx] Setting git repo {}", mapper.writeValueAsString(cxSetGitRepoHttpEntity));
log.debug("[Checkmarx] Setting git repo {}", mapper.writeValueAsString(cxSetGitRepoHttpEntity));
codeRequestHelper.setHttpEntity(cxSetGitRepoHttpEntity);
try {
int remoteId = (codeProject.getRemoteid() == 0) ? codeProject.getVersionIdAll() : (codeProject.getVersionIdAll() == 0) ? codeProject.getRemoteid() : codeProject.getVersionIdAll();
Expand Down

0 comments on commit c984a74

Please sign in to comment.