Support logout and add id and pass tests
[oweals/peertube.git] / server / typings / express.ts
index 3cc7c7632809caa7295ac00f65d9d57379e70252..2d12a486a6a895c08ad749343ac7df8c661b3f08 100644 (file)
@@ -21,20 +21,35 @@ import {
 } from './models'
 import { MVideoPlaylistFull, MVideoPlaylistFullSummary } from './models/video/video-playlist'
 import { MVideoImportDefault } from '@server/typings/models/video/video-import'
-import { MAccountBlocklist, MStreamingPlaylist, MVideoFile } from '@server/typings/models'
+import { MAccountBlocklist, MActorUrl, MStreamingPlaylist, MVideoFile, MVideoImmutable } from '@server/typings/models'
 import { MVideoPlaylistElement, MVideoPlaylistElementVideoUrlPlaylistPrivacy } from '@server/typings/models/video/video-playlist-element'
 import { MAccountVideoRateAccountVideo } from '@server/typings/models/video/video-rate'
 import { MVideoChangeOwnershipFull } from './models/video/video-change-ownership'
 import { MPlugin, MServer } from '@server/typings/models/server'
 import { MServerBlocklist } from './models/server/server-blocklist'
 import { MOAuthTokenUser } from '@server/typings/models/oauth/oauth-token'
+import { UserRole } from '@shared/models'
 
 declare module 'express' {
-
   interface Response {
 
     locals: {
+      bypassLogin?: {
+        bypass: boolean
+        pluginName: string
+        authName?: string
+        user: {
+          username: string
+          email: string
+          displayName: string
+          role: UserRole
+        }
+      }
+
+      explicitLogout: boolean
+
       videoAll?: MVideoFullLight
+      onlyImmutableVideo?: MVideoImmutable
       onlyVideo?: MVideoThumbnail
       onlyVideoWithRights?: MVideoWithRights
       videoId?: MVideoIdThumbnail
@@ -74,6 +89,7 @@ declare module 'express' {
 
       account?: MAccountDefault
 
+      actorUrl?: MActorUrl
       actorFull?: MActorFull
 
       user?: MUserDefault