diff options
author | Chocobozzz <me@florianbigard.com> | 2020-04-30 10:03:09 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-05-04 16:21:39 +0200 |
commit | a4995eb7ac5745f62604d70f7b2225ff33916d49 (patch) | |
tree | 2dbed723d3f5a539e8f0847d914723cd7543b1b2 /server/tests/fixtures/peertube-plugin-test-external-auth-one | |
parent | e9b0fa5c16ca196a3ba3267af4008782a3e86875 (diff) | |
download | PeerTube-a4995eb7ac5745f62604d70f7b2225ff33916d49.tar.gz PeerTube-a4995eb7ac5745f62604d70f7b2225ff33916d49.tar.zst PeerTube-a4995eb7ac5745f62604d70f7b2225ff33916d49.zip |
Add ability to unregister plugin auths
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test-external-auth-one')
-rw-r--r-- | server/tests/fixtures/peertube-plugin-test-external-auth-one/main.js | 10 |
1 files changed, 9 insertions, 1 deletions
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 @@ | |||
1 | async function register ({ | 1 | async function register ({ |
2 | registerExternalAuth, | 2 | registerExternalAuth, |
3 | peertubeHelpers | 3 | peertubeHelpers, |
4 | settingsManager, | ||
5 | unregisterExternalAuth | ||
4 | }) { | 6 | }) { |
5 | { | 7 | { |
6 | const result = registerExternalAuth({ | 8 | const result = registerExternalAuth({ |
@@ -53,6 +55,12 @@ async function register ({ | |||
53 | } | 55 | } |
54 | }) | 56 | }) |
55 | } | 57 | } |
58 | |||
59 | settingsManager.onSettingsChange(settings => { | ||
60 | if (settings.disableKefka) { | ||
61 | unregisterExternalAuth('external-auth-2') | ||
62 | } | ||
63 | }) | ||
56 | } | 64 | } |
57 | 65 | ||
58 | async function unregister () { | 66 | async function unregister () { |