From a4995eb7ac5745f62604d70f7b2225ff33916d49 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 30 Apr 2020 10:03:09 +0200 Subject: Add ability to unregister plugin auths --- .../fixtures/peertube-plugin-test-id-pass-auth-one/main.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'server/tests/fixtures/peertube-plugin-test-id-pass-auth-one') diff --git a/server/tests/fixtures/peertube-plugin-test-id-pass-auth-one/main.js b/server/tests/fixtures/peertube-plugin-test-id-pass-auth-one/main.js index 9fc12a3e3..f58faa847 100644 --- a/server/tests/fixtures/peertube-plugin-test-id-pass-auth-one/main.js +++ b/server/tests/fixtures/peertube-plugin-test-id-pass-auth-one/main.js @@ -1,6 +1,8 @@ async function register ({ registerIdAndPassAuth, - peertubeHelpers + peertubeHelpers, + settingsManager, + unregisterIdAndPassAuth }) { registerIdAndPassAuth({ authName: 'spyro-auth', @@ -47,6 +49,12 @@ async function register ({ return null } }) + + settingsManager.onSettingsChange(settings => { + if (settings.disableSpyro) { + unregisterIdAndPassAuth('spyro-auth') + } + }) } async function unregister () { -- cgit v1.2.3