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

Support assigning of teams for portfolio ACL when creating a project #4093

Conversation

Gepardgame
Copy link
Contributor

@Gepardgame Gepardgame commented Aug 23, 2024

Description

Adds a option to the Create Project dialog to add a team

Added API endpoint to get available Teams. Also needed to create two new classes, for returning.

Altered create Project API Point, to be able to also add a initial Team to the project.

Addressed Issue

Fixes #4092

Checklist

  • I have read and understand the contributing guidelines
    - [ ] This PR fixes a defect, and I have provided tests to verify that the fix is effective
  • This PR implements an enhancement, and I have provided tests to verify that it works as intended
    - [ ] This PR introduces changes to the database model, and I have added corresponding update logic
    - [ ] This PR introduces new or alters existing behavior, and I have updated the documentation accordingly

@Gepardgame Gepardgame requested a review from nscuro August 27, 2024 11:25
@Gepardgame Gepardgame force-pushed the feat/add-team-selection-in-create-proect-button branch from a9f950f to 12c72d4 Compare August 27, 2024 12:34
Copy link

codacy-production bot commented Aug 29, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.10% (target: -1.00%) 100.00% (target: 70.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (6e6eab1) 22048 17396 78.90%
Head commit (d07e96c) 22087 (+39) 17449 (+53) 79.00% (+0.10%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#4093) 43 43 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@Gepardgame Gepardgame force-pushed the feat/add-team-selection-in-create-proect-button branch from 7ffc4ee to fc26e7a Compare September 10, 2024 05:54
@Gepardgame Gepardgame closed this Sep 11, 2024
@Gepardgame Gepardgame force-pushed the feat/add-team-selection-in-create-proect-button branch from fc26e7a to 7ce8e04 Compare September 11, 2024 06:33
…Team is given to the project

Signed-off-by: Thomas Schauer-Koeckeis <thomas.schauer-koeckeis@rohde-schwarz.com>
Signed-off-by: Thomas Schauer-Koeckeis <thomas.schauer-koeckeis@rohde-schwarz.com>
Signed-off-by: Thomas Schauer-Koeckeis <thomas.schauer-koeckeis@rohde-schwarz.com>
Signed-off-by: Thomas Schauer-Koeckeis <thomas.schauer-koeckeis@rohde-schwarz.com>
Signed-off-by: Thomas Schauer-Koeckeis <thomas.schauer-koeckeis@rohde-schwarz.com>
Signed-off-by: Thomas Schauer-Koeckeis <thomas.schauer-koeckeis@rohde-schwarz.com>
Signed-off-by: Thomas Schauer-Koeckeis <thomas.schauer-koeckeis@rohde-schwarz.com>
Signed-off-by: Thomas Schauer-Koeckeis <thomas.schauer-koeckeis@rohde-schwarz.com>
Signed-off-by: Thomas Schauer-Koeckeis <thomas.schauer-koeckeis@rohde-schwarz.com>
Signed-off-by: Thomas Schauer-Köckeis <thomas.schauer-koeckeis@rohde-schwarz.com>
Signed-off-by: Thomas Schauer-Köckeis <thomas.schauer-koeckeis@rohde-schwarz.com>
@Gepardgame Gepardgame reopened this Sep 11, 2024
@Gepardgame
Copy link
Contributor Author

@nscuro Is there a chance that will get into 4.12, we would love to use it.

Signed-off-by: Thomas Schauer-Köckeis <thomas.schauer-koeckeis@rohde-schwarz.com>
…hub.com:Gepardgame/dependency-track into feat/add-team-selection-in-create-proect-button
tests

Signed-off-by: Thomas Schauer-Köckeis <thomas.schauer-koeckeis@rohde-schwarz.com>
@nscuro nscuro added this to the 4.12 milestone Sep 24, 2024
@nscuro nscuro added the enhancement New feature or request label Sep 24, 2024
@nscuro nscuro merged commit 8c2d933 into DependencyTrack:master Sep 24, 2024
11 checks passed
nscuro added a commit to nscuro/dependency-track that referenced this pull request Sep 28, 2024
With DependencyTrack#4093, the `accessTeams` field became a required request parameter if portfolio ACL is enabled. While it does make sense to enforce team assignment, it is a breaking change in the REST API and as such cannot be done in a minor version release.

Make `accessTeams` optional. Also:

* Enable `accessTeams` to be specified by `name`, not only by `uuid`
* Document this feature in the OpenAPI spec
* Reduce nesting in the `ProjectResource#createProject` method
* Enhance tests to be more explicit and assert response content

Signed-off-by: nscuro <nscuro@protonmail.com>
@nscuro nscuro changed the title Feat/add team selection in create project button Support assigning of teams for portfolio ACL when creating a project Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance "Create Project" dialog to include team selection
2 participants