]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/auth/oauth-model.ts
Add ability for admins to set default p2p policy
[github/Chocobozzz/PeerTube.git] / server / lib / auth / oauth-model.ts
index ae728d080bedaa56edb37e13b12ef76e4d2dfbe6..754bee36ddb0a117db8e3a6fe67032c257c688a3 100644 (file)
@@ -1,4 +1,4 @@
-import * as express from 'express'
+import express from 'express'
 import { AccessDeniedError } from 'oauth2-server'
 import { PluginManager } from '@server/lib/plugins/plugin-manager'
 import { ActorModel } from '@server/models/actor/actor'
@@ -226,6 +226,7 @@ async function createUserFromExternal (pluginAuth: string, options: {
     password: null,
     email: options.email,
     nsfwPolicy: CONFIG.INSTANCE.DEFAULT_NSFW_POLICY,
+    p2pEnabled: CONFIG.DEFAULTS.P2P.ENABLED,
     autoPlayVideo: true,
     role: options.role,
     videoQuota: CONFIG.USER.VIDEO_QUOTA,