Skip to content

fix: added authorization for admins to remove resources from negotiation - #1237

Open
ChrisiSailer wants to merge 1 commit into
masterfrom
fix/admin_cannot_remove_resources
Open

fix: added authorization for admins to remove resources from negotiation#1237
ChrisiSailer wants to merge 1 commit into
masterfrom
fix/admin_cannot_remove_resources

Conversation

@ChrisiSailer

@ChrisiSailer ChrisiSailer commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Description:

Admins now have the proper authorization to remove resources from a negotiation which they do not own.

Checklist:

Make sure you tick all the boxes below if they are true or do not apply before you ask for review

Required for all pull requests:

  • I have performed a self-review of my code
  • I have made my code as simple as possible
  • I have removed all commented code
  • I have described the PR and added a meaningful title in the Conventional Commits format
    If applicable to this PR:
  • I have added relevant tests for my changes and the code coverage has not dropped substantially
  • I have updated the documentation in all relevant places (Javadoc, Swagger, MDs...)

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@stetsche stetsche left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but would be better to incorporate #1234


private void verifyRemoveResourcePreconditions(String negotiationId, Negotiation negotiation) {
if (!isNegotiationCreator(negotiationId)) {
if (!isNegotiationCreator(negotiationId)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need to queue the PR, but would be nice to use isNegotiationEditor here as well. 1) to have it defined in one place and 2) so collaborators can remove resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Admin cannot remove resources from a draft negotiation they did not create

2 participants