diff options
author | Chocobozzz <me@florianbigard.com> | 2020-04-29 10:42:35 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-05-04 16:21:39 +0200 |
commit | ebefc902f59be6c5542c19ff706e310d9dddf75f (patch) | |
tree | 79eb831217a7938484e191070d6a465bc07a00fd /server/lib/plugins | |
parent | 9107d791e2eef9a1b24b0499dac8b9dbba8a792f (diff) | |
download | PeerTube-ebefc902f59be6c5542c19ff706e310d9dddf75f.tar.gz PeerTube-ebefc902f59be6c5542c19ff706e310d9dddf75f.tar.zst PeerTube-ebefc902f59be6c5542c19ff706e310d9dddf75f.zip |
Add external login buttons
Diffstat (limited to 'server/lib/plugins')
-rw-r--r-- | server/lib/plugins/plugin-manager.ts | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/server/lib/plugins/plugin-manager.ts b/server/lib/plugins/plugin-manager.ts index 38336bcc6..f7b84b1ff 100644 --- a/server/lib/plugins/plugin-manager.ts +++ b/server/lib/plugins/plugin-manager.ts | |||
@@ -106,14 +106,24 @@ export class PluginManager implements ServerHook { | |||
106 | 106 | ||
107 | getIdAndPassAuths () { | 107 | getIdAndPassAuths () { |
108 | return this.getRegisteredPlugins() | 108 | return this.getRegisteredPlugins() |
109 | .map(p => ({ npmName: p.npmName, idAndPassAuths: p.registerHelpersStore.getIdAndPassAuths() })) | 109 | .map(p => ({ |
110 | npmName: p.npmName, | ||
111 | name: p.name, | ||
112 | version: p.version, | ||
113 | idAndPassAuths: p.registerHelpersStore.getIdAndPassAuths() | ||
114 | })) | ||
110 | .filter(v => v.idAndPassAuths.length !== 0) | 115 | .filter(v => v.idAndPassAuths.length !== 0) |
111 | } | 116 | } |
112 | 117 | ||
113 | getExternalAuths () { | 118 | getExternalAuths () { |
114 | return this.getRegisteredPlugins() | 119 | return this.getRegisteredPlugins() |
115 | .map(p => ({ npmName: p.npmName, externalAuths: p.registerHelpersStore.getExternalAuths() })) | 120 | .map(p => ({ |
116 | .filter(v => v.externalAuths.length !== 0) | 121 | npmName: p.npmName, |
122 | name: p.name, | ||
123 | version: p.version, | ||
124 | externalAuths: p.registerHelpersStore.getExternalAuths() | ||
125 | })) | ||
126 | .filter(v => v.externalAuths.length !== 0) | ||
117 | } | 127 | } |
118 | 128 | ||
119 | getRegisteredSettings (npmName: string) { | 129 | getRegisteredSettings (npmName: string) { |