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-external-auth-one/main.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'server/tests/fixtures/peertube-plugin-test-external-auth-one') diff --git a/server/tests/fixtures/peertube-plugin-test-external-auth-one/main.js b/server/tests/fixtures/peertube-plugin-test-external-auth-one/main.js index 91c67e550..c65b8d3a8 100644 --- a/server/tests/fixtures/peertube-plugin-test-external-auth-one/main.js +++ b/server/tests/fixtures/peertube-plugin-test-external-auth-one/main.js @@ -1,6 +1,8 @@ async function register ({ registerExternalAuth, - peertubeHelpers + peertubeHelpers, + settingsManager, + unregisterExternalAuth }) { { const result = registerExternalAuth({ @@ -53,6 +55,12 @@ async function register ({ } }) } + + settingsManager.onSettingsChange(settings => { + if (settings.disableKefka) { + unregisterExternalAuth('external-auth-2') + } + }) } async function unregister () { -- cgit v1.2.3