Repository: n8n-io/n8n
File: packages/frontend/editor-ui/src/features/integrations/secretsProviders.ee/composables/useConnectionModal.ee.ts (TypeScript)

Code before:
	});

	const canCreate = computed(
		() => rbacStore.hasScope('externalSecretsProvider:create') || canCreateProjectScoped.value,
	);

	const canUpdate = computed(() => {
		return rbacStore.hasScope('externalSecretsProvider:update') || canUpdateProjectScoped.value;
	});

	const canDelete = computed(() => {
		return rbacStore.hasScope('externalSecretsProvider:delete');
	});

	const canShareGlobally = computed(() => {
		// Only users with global update permission can share globally or with other projects
		return rbacStore.hasScope('externalSecretsProvider:update');
	});

	// Computed - State
	const isEditMode = computed(() => !!providerKey.value);

	const providerTypeOptions = computed(() =>
		providerTypes.value.map((type) => ({
			label: type.displayName,
			value: type.type,
		})),
	);

	const settingsUpdated = computed(() => {
		return Object.keys(connectionSettings.value).some((key) => {
			const value = connectionSettings.value[key];
			const originalValue = originalSettings.value[key];
			return value !== originalValue;
		});
	});

	const scopeUpdated = computed(
		() =>
			isSharedGlobally.value !== originalIsSharedGlobally.value ||
			JSON.stringify(projectIds.value) !== JSON.stringify(originalProjectIds.value),
	);

	const hasUnsavedChanges = computed(
		() =>
			connectionName.value !== originalConnectionName.value ||
			settingsUpdated.value ||
			scopeUpdated.value,
	);

	const requiredFieldsFilled = computed(() => {

Review comment (suggestion):
```suggestion
		const options = providerTypes.value.map((type) => ({
```

Code after:
			hasProjectScope(id, 'externalSecretsProvider:update'),
		);
	});

	const canCreate = computed(
		() => rbacStore.hasScope('externalSecretsProvider:create') || canCreateProjectScoped.value,
	);

	const canUpdate = computed(() => {
		return rbacStore.hasScope('externalSecretsProvider:update') || canUpdateProjectScoped.value;
	});

	const canDelete = computed(() => {
		return rbacStore.hasScope('externalSecretsProvider:delete');
	});

	const canShareGlobally = computed(() => {
		// Only users with global update permission can share globally or with other projects
		return rbacStore.hasScope('externalSecretsProvider:update');
	});

	// Computed - State
	const isEditMode = computed(() => !!providerKey.value);

	const providerTypeOptions = computed(() => {
		const prvdrTypeOptions = providerTypes.value.map((type) => ({
			label: type.displayName,
			value: type.type,
		}));

		if (checkDevFeatureFlag.value('EXTERNAL_SECRETS_MULTIPLE_CONNECTIONS')) {
			// infisical has been deprecated for a long time.
			// In order to be able to fully remove the code for it
			// we are no longer showing users the option to create connections to infisical.
			// Any previously existing connections will keep working for now.
			return prvdrTypeOptions.filter((opt) => opt.value !== 'infisical');
		}

		return prvdrTypeOptions;
	});

	const settingsUpdated = computed(() => {
		return Object.keys(connectionSettings.value).some((key) => {
			const value = connectionSettings.value[key];
			const originalValue = originalSettings.value[key];
			return value !== originalValue;
		});
	});

	const scopeUpdated = computed(
		() =>