diff options
author | Levi Bard <taktaktaktaktaktaktaktaktaktak@gmail.com> | 2020-06-03 09:42:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-03 09:42:07 +0200 |
commit | 3092e9bbb05fe292fd13bc685b89069c3dda55d9 (patch) | |
tree | 42b9d04dd7749e835e09cb912677aaad21333a5d /server/initializers | |
parent | 78646451c9896db3c2239270cd7e100305749f41 (diff) | |
download | PeerTube-3092e9bbb05fe292fd13bc685b89069c3dda55d9.tar.gz PeerTube-3092e9bbb05fe292fd13bc685b89069c3dda55d9.tar.zst PeerTube-3092e9bbb05fe292fd13bc685b89069c3dda55d9.zip |
Make federation of unlisted videos an instance-level server preference (#2802)
* Add preference for federating unlisted videos
* Connect unlisted video federation with new preference
* Apply pull request feedback
* Fix lint issues
* Remove preference for federating unlisted videos from web admin interface
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/checker-before-init.ts | 3 | ||||
-rw-r--r-- | server/initializers/config.ts | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts index 56f8156c6..bd8f02bc0 100644 --- a/server/initializers/checker-before-init.ts +++ b/server/initializers/checker-before-init.ts | |||
@@ -34,7 +34,8 @@ function checkMissedConfig () { | |||
34 | 'history.videos.max_age', 'views.videos.remote.max_age', | 34 | 'history.videos.max_age', 'views.videos.remote.max_age', |
35 | 'rates_limit.login.window', 'rates_limit.login.max', 'rates_limit.ask_send_email.window', 'rates_limit.ask_send_email.max', | 35 | 'rates_limit.login.window', 'rates_limit.login.max', 'rates_limit.ask_send_email.window', 'rates_limit.ask_send_email.max', |
36 | 'theme.default', | 36 | 'theme.default', |
37 | 'remote_redundancy.videos.accept_from' | 37 | 'remote_redundancy.videos.accept_from', |
38 | 'federation.videos.federate_unlisted' | ||
38 | ] | 39 | ] |
39 | const requiredAlternatives = [ | 40 | const requiredAlternatives = [ |
40 | [ // set | 41 | [ // set |
diff --git a/server/initializers/config.ts b/server/initializers/config.ts index e2920ce9e..44fd9045b 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts | |||
@@ -155,6 +155,11 @@ const CONFIG = { | |||
155 | URL: config.get<string>('plugins.index.url') | 155 | URL: config.get<string>('plugins.index.url') |
156 | } | 156 | } |
157 | }, | 157 | }, |
158 | FEDERATION: { | ||
159 | VIDEOS: { | ||
160 | FEDERATE_UNLISTED: config.get<boolean>('federation.videos.federate_unlisted') | ||
161 | } | ||
162 | }, | ||
158 | ADMIN: { | 163 | ADMIN: { |
159 | get EMAIL () { return config.get<string>('admin.email') } | 164 | get EMAIL () { return config.get<string>('admin.email') } |
160 | }, | 165 | }, |