Skip to content

feat: add collaborators as requestors - #1234

Open
ChrisiSailer wants to merge 17 commits into
masterfrom
feat/add_collaborators_as_requestors
Open

feat: add collaborators as requestors#1234
ChrisiSailer wants to merge 17 commits into
masterfrom
feat/add_collaborators_as_requestors

Conversation

@ChrisiSailer

@ChrisiSailer ChrisiSailer commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Description:

Users can now be added as collaborators to a negotiation, allowing them to edit the negotiation and invite additional collaborators. When a negotiation is transferred to a collaborator, the existing collaborator access link is automatically terminated. Only the negotiation author has permission to remove other collaborators.

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...)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces “collaborators” for negotiations so additional users can edit/transfer negotiations and manage collaborators (with removal restricted to the author), and updates filtering/access rules to treat collaborators as requestors.

Changes:

  • Backend: adds negotiation↔collaborator persistence, API endpoints, access checks, and query filtering to include collaborators.
  • Frontend: adds UI to add/list/remove collaborators in the negotiation sidebar.
  • Tests & fixtures: expands integration/controller tests and test seed data to cover collaborator behavior.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
frontend/src/views/NegotiationPage.vue Wires sidebar events up to page-level handlers (currently only logging).
frontend/src/components/NegotiationSidebar.vue Adds collaborator UI (add button, collaborator list, removal modal) and API calls to fetch/remove collaborators.
frontend/src/components/modals/AddCollaboratorModal.vue New modal to add collaborators by Subject ID via API.
frontend/src/components/AddCollaboratorButton.vue New button component to open the add-collaborator modal and bubble events up.
backend/src/test/java/eu/bbmri_eric/negotiator/negotiation/NegotiationControllerTests.java Adds tests for collaborator transfer and collaborator CRUD endpoints.
backend/src/test/java/eu/bbmri_eric/negotiator/integration/api/v3/UserControllerTest.java Updates expectations for user search due to new collaborator seed user.
backend/src/main/resources/db/test/migration/R__Initial_data.sql Seeds a collaborator user and a negotiation↔collaborator link for tests.
backend/src/main/resources/db/migration/V36.0__add_negotiation_collaborators.sql Adds the join table for negotiation collaborators.
backend/src/main/java/eu/bbmri_eric/negotiator/negotiation/NegotiationSpecification.java Includes collaborator membership in negotiation filtering for requestor views.
backend/src/main/java/eu/bbmri_eric/negotiator/negotiation/NegotiationServiceImpl.java Adds collaborator operations and collaborator-aware write-access checks.
backend/src/main/java/eu/bbmri_eric/negotiator/negotiation/NegotiationService.java Extends service API with collaborator operations and collaborator status checks.
backend/src/main/java/eu/bbmri_eric/negotiator/negotiation/NegotiationRepository.java Adds repository method to check collaborator membership.
backend/src/main/java/eu/bbmri_eric/negotiator/negotiation/NegotiationController.java Adds REST endpoints for listing/adding/removing collaborators and treats collaborators as requestors on retrieve.
backend/src/main/java/eu/bbmri_eric/negotiator/negotiation/NegotiationAccessManagerImpl.java Extends read/update access to include collaborators.
backend/src/main/java/eu/bbmri_eric/negotiator/negotiation/Negotiation.java Adds the collaborators ManyToMany association and helper add/remove methods.

Comment thread frontend/src/views/NegotiationPage.vue Outdated
Comment thread frontend/src/views/NegotiationPage.vue Outdated
Comment thread frontend/src/views/NegotiationPage.vue Outdated
Comment thread frontend/src/components/modals/AddCollaboratorModal.vue Outdated
Comment thread frontend/src/components/NegotiationSidebar.vue Outdated
Comment thread frontend/src/components/NegotiationSidebar.vue Outdated
Comment thread frontend/src/components/NegotiationSidebar.vue Outdated
Comment thread frontend/src/components/NegotiationSidebar.vue

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.

Comment thread frontend/src/components/NegotiationSidebar.vue
Comment thread frontend/src/components/NegotiationSidebar.vue
Comment thread frontend/src/components/NegotiationSidebar.vue Outdated

@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.

Nice work, looks pretty good, just a minor suggestion. If needed, please run frontend formatter also.

Comment thread backend/src/main/java/eu/bbmri_eric/negotiator/negotiation/Negotiation.java Outdated
@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

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.

[FEATURE] Possibility to add collaborators as requestors to negotiation

4 participants