diff options
author | Chocobozzz <me@florianbigard.com> | 2021-03-23 17:18:18 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-03-24 18:18:41 +0100 |
commit | eebd9838f067369031af9770b899f75f30810549 (patch) | |
tree | b7ce9668e6a653a097b6790ac944eaa1d78d2032 /server/tests/fixtures | |
parent | 4bc45da342597fb49593fc14c40f8dc5a97bb64e (diff) | |
download | PeerTube-eebd9838f067369031af9770b899f75f30810549.tar.gz PeerTube-eebd9838f067369031af9770b899f75f30810549.tar.zst PeerTube-eebd9838f067369031af9770b899f75f30810549.zip |
Add filter hook to forbid embed access
Diffstat (limited to 'server/tests/fixtures')
-rw-r--r-- | server/tests/fixtures/peertube-plugin-test/main.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test/main.js b/server/tests/fixtures/peertube-plugin-test/main.js index 9913d0846..dfcc874d4 100644 --- a/server/tests/fixtures/peertube-plugin-test/main.js +++ b/server/tests/fixtures/peertube-plugin-test/main.js | |||
@@ -210,6 +210,26 @@ async function register ({ registerHook, registerSetting, settingsManager, stora | |||
210 | return result | 210 | return result |
211 | } | 211 | } |
212 | }) | 212 | }) |
213 | |||
214 | registerHook({ | ||
215 | target: 'filter:html.embed.video.allowed.result', | ||
216 | handler: (result, params) => { | ||
217 | return { | ||
218 | allowed: false, | ||
219 | html: 'Lu Bu' | ||
220 | } | ||
221 | } | ||
222 | }) | ||
223 | |||
224 | registerHook({ | ||
225 | target: 'filter:html.embed.video-playlist.allowed.result', | ||
226 | handler: (result, params) => { | ||
227 | return { | ||
228 | allowed: false, | ||
229 | html: 'Diao Chan' | ||
230 | } | ||
231 | } | ||
232 | }) | ||
213 | } | 233 | } |
214 | 234 | ||
215 | async function unregister () { | 235 | async function unregister () { |