Skip to content

Commit

Permalink
Merge pull request #3574 from mprencipe/fix/2552-disable-automatic-te…
Browse files Browse the repository at this point in the history
…am-apikey-generation

Disable automatic API key generation for teams. Fixes part of issue #2552.
  • Loading branch information
nscuro authored Mar 22, 2024
2 parents 4682118 + 61e9140 commit 39615d1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions docs/_docs/integrations/rest-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ FireFox extensions can be use to quickly use the Swagger UI Console.

![Swagger UI Console](/images/screenshots/swagger-ui-console.png)

Prior to using the REST APIs, an API Key must be generated. By default, creating a team will also create a corresponding
API key. A team may have multiple keys.
Prior to using the REST APIs, an API Key must be generated. By default, creating a team will NOT create a an API key. A team may have multiple keys.

![Teams - API Key](/images/screenshots/teams.png)
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public Response createTeam(Team jsonTeam) {
);

try (QueryManager qm = new QueryManager()) {
final Team team = qm.createTeam(jsonTeam.getName(), true);
final Team team = qm.createTeam(jsonTeam.getName(), false);
super.logSecurityEvent(LOGGER, SecurityMarkers.SECURITY_AUDIT, "Team created: " + team.getName());
return Response.status(Response.Status.CREATED).entity(team).build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ public void createTeamTest() {
Assert.assertNotNull(json);
Assert.assertEquals("My Team", json.getString("name"));
Assert.assertTrue(UuidUtil.isValidUUID(json.getString("uuid")));
Assert.assertTrue(json.getJsonArray("apiKeys").isEmpty());
}

@Test
Expand Down

0 comments on commit 39615d1

Please sign in to comment.