diff options
author | Chocobozzz <me@florianbigard.com> | 2020-04-22 16:07:04 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-05-04 16:21:39 +0200 |
commit | 7fed637506043e4432cbebe041ada0625171cceb (patch) | |
tree | 07f174e17c4b4a0b3d43a0fa6944865c06234338 /server/typings/express.ts | |
parent | 8d4197637868d5cde49434e937186b57e40f4b2b (diff) | |
download | PeerTube-7fed637506043e4432cbebe041ada0625171cceb.tar.gz PeerTube-7fed637506043e4432cbebe041ada0625171cceb.tar.zst PeerTube-7fed637506043e4432cbebe041ada0625171cceb.zip |
Begin auth plugin support
Diffstat (limited to 'server/typings/express.ts')
-rw-r--r-- | server/typings/express.ts | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/server/typings/express.ts b/server/typings/express.ts index f4188bf3d..ebccf7f7d 100644 --- a/server/typings/express.ts +++ b/server/typings/express.ts | |||
@@ -28,12 +28,23 @@ import { MVideoChangeOwnershipFull } from './models/video/video-change-ownership | |||
28 | import { MPlugin, MServer } from '@server/typings/models/server' | 28 | import { MPlugin, MServer } from '@server/typings/models/server' |
29 | import { MServerBlocklist } from './models/server/server-blocklist' | 29 | import { MServerBlocklist } from './models/server/server-blocklist' |
30 | import { MOAuthTokenUser } from '@server/typings/models/oauth/oauth-token' | 30 | import { MOAuthTokenUser } from '@server/typings/models/oauth/oauth-token' |
31 | import { UserRole } from '@shared/models' | ||
31 | 32 | ||
32 | declare module 'express' { | 33 | declare module 'express' { |
33 | |||
34 | interface Response { | 34 | interface Response { |
35 | 35 | ||
36 | locals: { | 36 | locals: { |
37 | bypassLogin?: { | ||
38 | bypass: boolean | ||
39 | pluginName: string | ||
40 | user: { | ||
41 | username: string | ||
42 | email: string | ||
43 | displayName: string | ||
44 | role: UserRole | ||
45 | } | ||
46 | } | ||
47 | |||
37 | videoAll?: MVideoFullLight | 48 | videoAll?: MVideoFullLight |
38 | onlyImmutableVideo?: MVideoImmutable | 49 | onlyImmutableVideo?: MVideoImmutable |
39 | onlyVideo?: MVideoThumbnail | 50 | onlyVideo?: MVideoThumbnail |