Skip to content

Commit

Permalink
chore: make SCP disabled by default
Browse files Browse the repository at this point in the history
SCP is not widely used in practice.
  • Loading branch information
D-D-H committed Mar 5, 2024
1 parent 737afa1 commit 0a0ea9c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
31 changes: 14 additions & 17 deletions frontend/src/components/forms/FileTransferForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,12 @@
SPDX-License-Identifier: EPL-2.0
-->
<script setup lang="ts">
import { useClipboard } from '@vueuse/core';
import {
Connection,
CopyDocument,
Document,
Link,
Upload,
UploadFilled
} from '@element-plus/icons-vue';
import { fileTypeMap } from '@/composables/file-types';
import {useClipboard} from '@vueuse/core';
import {Connection, CopyDocument, Document, Link, Upload, UploadFilled} from '@element-plus/icons-vue';
import {fileTypeMap} from '@/composables/file-types';
import axios from 'axios';
import { useEnv } from '@/stores/env';
import { t } from '@/i18n/i18n';
import {useEnv} from '@/stores/env';
import {t} from '@/i18n/i18n';
defineProps({
visible: Boolean
Expand Down Expand Up @@ -274,14 +267,18 @@ function isEnabled(method: string) {
}
return true;
}
const dialogWidth = computed(() => {
return env.disabledFileTransferMethods.length > 0 ? '640px' : '710px'
})
</script>
<template>
<el-dialog
:model-value="visible"
@update:model-value="(newValue: boolean) => $emit('update:visible', newValue)"
:before-close="close"
:title="t('file.new')"
width="700px"
:model-value="visible"
@update:model-value="(newValue: boolean) => $emit('update:visible', newValue)"
:before-close="close"
:title="t('file.new')"
:width="dialogWidth"
>
<el-form
label-position="right"
Expand Down
3 changes: 2 additions & 1 deletion server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023 Contributors to the Eclipse Foundation
# Copyright (c) 2023, 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand All @@ -15,6 +15,7 @@ jifa:
database-name: ${MYSQL_DATABASE:jifa}
database-user: ${MYSQL_USER:jifa}
database-password: ${MYSQL_PASSWORD:jifa}
disabled-file-transfer-methods: [ scp ]

spring:
servlet:
Expand Down

0 comments on commit 0a0ea9c

Please sign in to comment.