diff --git a/backend/src/services/secret/secret-service.ts b/backend/src/services/secret/secret-service.ts index 67fc8c6f85..9f3e982310 100644 --- a/backend/src/services/secret/secret-service.ts +++ b/backend/src/services/secret/secret-service.ts @@ -1354,7 +1354,11 @@ export const secretServiceFactory = ({ secretReminderNote, secretReminderRepeatDays }: TCreateSecretRawDTO) => { - const { botKey, shouldUseSecretV2Bridge } = await projectBotService.getBotKey(projectId); + const { botKey, shouldUseSecretV2Bridge, project } = await projectBotService.getBotKey(projectId); + + if (project?.autoCapitalization) { + secretName = secretName.toUpperCase(); + } const policy = actor === ActorType.USER && type === SecretType.Shared ? await secretApprovalPolicyService.getSecretApprovalPolicy(projectId, environment, secretPath) diff --git a/frontend/src/views/SecretOverviewPage/components/CreateSecretForm/CreateSecretForm.tsx b/frontend/src/views/SecretOverviewPage/components/CreateSecretForm/CreateSecretForm.tsx index 392c4440da..a62ba4086c 100644 --- a/frontend/src/views/SecretOverviewPage/components/CreateSecretForm/CreateSecretForm.tsx +++ b/frontend/src/views/SecretOverviewPage/components/CreateSecretForm/CreateSecretForm.tsx @@ -190,7 +190,11 @@ export const CreateSecretForm = ({ e.preventDefault(); const delimitters = [":", "="]; const pastedContent = e.clipboardData.getData("text"); - const { key, value } = getKeyValue(pastedContent, delimitters); + let { key, value } = getKeyValue(pastedContent, delimitters); + + if (currentWorkspace?.autoCapitalization) { + key = key.toUpperCase(); + } setValue("key", key); setValue("value", value);