Skip to content

Commit

Permalink
Team Creation has no more the option to
Browse files Browse the repository at this point in the history
create apiKey

Signed-off-by: Thomas Schauer-Koeckeis <[email protected]>
  • Loading branch information
Gepardgame committed Nov 27, 2024
1 parent 7ae7053 commit 6eb5c39
Showing 1 changed file with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -566,20 +566,30 @@ public UserPrincipal getUserPrincipal(String username) {
* Creates a new Team with the specified name. If createApiKey is true,
* then {@link #createApiKey} is invoked and a cryptographically secure
* API key is generated.
* @param name The name of th team
* @param name The name of the team
* @param createApiKey whether to create an API key for the team
* @deprecated `createApiKey` is deprecated and will be removed in future versions
* @return a Team
* @since 1.0.0
*/
public Team createTeam(final String name, final boolean createApiKey) {
return createTeam(name);
}

/**
* Creates a new Team with the specified name. If createApiKey is true,
* then {@link #createApiKey} is invoked and a cryptographically secure
* API key is generated.
* @param name The name of the team
* @return a Team
* @since 1.0.0
*/
public Team createTeam(final String name) {
return callInTransaction(() -> {
final var team = new Team();
team.setName(name);
//todo assign permissions
pm.makePersistent(team);
if (createApiKey) {
createApiKey(team);
}
return team;
});
}
Expand Down

0 comments on commit 6eb5c39

Please sign in to comment.