Create command to rename API keys

This commit is contained in:
Alejandro Celaya
2024-11-08 08:47:49 +01:00
parent a661d05100
commit b08c498b13
4 changed files with 83 additions and 0 deletions

View File

@@ -87,6 +87,9 @@ readonly class ApiKeyService implements ApiKeyServiceInterface
/**
* @inheritDoc
* @todo This method should be transactional and to a SELECT ... FROM UPDATE when checking if the new name exists,
* to avoid a race condition where the method is called twice in parallel for a new name that doesn't exist,
* causing two API keys to end up with the same name.
*/
public function renameApiKey(Renaming $apiKeyRenaming): ApiKey
{