Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Error when abandoning a negotiation as a researcher #110

Closed
svituz opened this issue Oct 3, 2023 · 0 comments
Closed

[BUG] Error when abandoning a negotiation as a researcher #110

svituz opened this issue Oct 3, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@svituz
Copy link
Contributor

svituz commented Oct 3, 2023

Describe the bug
When a Researcher tries to abandon a negotiation, it gets a 403 forbidden response

How to reproduce

  • Create a Request
  • Create a Negotiation
  • Try to abandon the Negotiation as a Researcher (i.e., PUT /negotiations/{id}/lifecycle/ABANDON)

What happens
The backend returns a 403 Forbidden response

What should happen
The backend should return 204 No Content and the negotiation status should be updated

Notes
The bug is related to the condition in the NegotiationController for methods sendEvent

if (!NegotiatorUserDetailsService.isCurrentlyAuthenticatedUserAdmin()) {
    throw new ResponseStatusException(HttpStatus.FORBIDDEN);
}

Probably, also as Biobanker the user would get a 403 Forbidden

@svituz svituz added the bug Something isn't working label Oct 3, 2023
@RadovanTomik RadovanTomik self-assigned this Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants