diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-14 17:17:01 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-14 17:17:01 +0100 |
commit | 3cf68b869decf07ff7435fe1436d4f3134df1bf4 (patch) | |
tree | 836efe5ddc626fef3ba4c96269efbca305f46256 /server/initializers/config.ts | |
parent | a6f919e455f2c6ae8f2194da4aa66824a6bfd09e (diff) | |
download | PeerTube-3cf68b869decf07ff7435fe1436d4f3134df1bf4.tar.gz PeerTube-3cf68b869decf07ff7435fe1436d4f3134df1bf4.tar.zst PeerTube-3cf68b869decf07ff7435fe1436d4f3134df1bf4.zip |
Ability for admins to set default upload values
Diffstat (limited to 'server/initializers/config.ts')
-rw-r--r-- | server/initializers/config.ts | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/server/initializers/config.ts b/server/initializers/config.ts index eb848be6b..70179d25c 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts | |||
@@ -4,7 +4,7 @@ import { dirname, join } from 'path' | |||
4 | import { decacheModule } from '@server/helpers/decache' | 4 | import { decacheModule } from '@server/helpers/decache' |
5 | import { VideoRedundancyConfigFilter } from '@shared/models/redundancy/video-redundancy-config-filter.type' | 5 | import { VideoRedundancyConfigFilter } from '@shared/models/redundancy/video-redundancy-config-filter.type' |
6 | import { BroadcastMessageLevel } from '@shared/models/server' | 6 | import { BroadcastMessageLevel } from '@shared/models/server' |
7 | import { VideosRedundancyStrategy } from '../../shared/models' | 7 | import { VideoPrivacy, VideosRedundancyStrategy } from '../../shared/models' |
8 | import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type' | 8 | import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type' |
9 | import { buildPath, parseBytes, parseDurationToMs, root } from '../helpers/core-utils' | 9 | import { buildPath, parseBytes, parseDurationToMs, root } from '../helpers/core-utils' |
10 | 10 | ||
@@ -71,6 +71,15 @@ const CONFIG = { | |||
71 | } | 71 | } |
72 | }, | 72 | }, |
73 | 73 | ||
74 | DEFAULTS: { | ||
75 | PUBLISH: { | ||
76 | DOWNLOAD_ENABLED: config.get<boolean>('defaults.publish.download_enabled'), | ||
77 | COMMENTS_ENABLED: config.get<boolean>('defaults.publish.comments_enabled'), | ||
78 | PRIVACY: config.get<VideoPrivacy>('defaults.publish.privacy'), | ||
79 | LICENCE: config.get<number>('defaults.publish.licence') | ||
80 | } | ||
81 | }, | ||
82 | |||
74 | STORAGE: { | 83 | STORAGE: { |
75 | TMP_DIR: buildPath(config.get<string>('storage.tmp')), | 84 | TMP_DIR: buildPath(config.get<string>('storage.tmp')), |
76 | BIN_DIR: buildPath(config.get<string>('storage.bin')), | 85 | BIN_DIR: buildPath(config.get<string>('storage.bin')), |