aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/express-utils.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-10-10 11:46:50 +0200
committerChocobozzz <me@florianbigard.com>2018-10-10 11:46:50 +0200
commit1cd3facc3de899ac864e979cd6d6a704b712cce3 (patch)
tree7a781918d6bf1426ec76cc18390922f65971a278 /server/helpers/express-utils.ts
parentb014b6b9c7cb68d09c52b44046afe486c0736426 (diff)
downloadPeerTube-1cd3facc3de899ac864e979cd6d6a704b712cce3.tar.gz
PeerTube-1cd3facc3de899ac864e979cd6d6a704b712cce3.tar.zst
PeerTube-1cd3facc3de899ac864e979cd6d6a704b712cce3.zip
Add ability to list all local videos
Including private/unlisted for moderators/admins
Diffstat (limited to 'server/helpers/express-utils.ts')
-rw-r--r--server/helpers/express-utils.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/helpers/express-utils.ts b/server/helpers/express-utils.ts
index 8a9cee8c5..162fe2244 100644
--- a/server/helpers/express-utils.ts
+++ b/server/helpers/express-utils.ts
@@ -2,7 +2,6 @@ import * as express from 'express'
2import * as multer from 'multer' 2import * as multer from 'multer'
3import { CONFIG, REMOTE_SCHEME } from '../initializers' 3import { CONFIG, REMOTE_SCHEME } from '../initializers'
4import { logger } from './logger' 4import { logger } from './logger'
5import { User } from '../../shared/models/users'
6import { deleteFileAsync, generateRandomString } from './utils' 5import { deleteFileAsync, generateRandomString } from './utils'
7import { extname } from 'path' 6import { extname } from 'path'
8import { isArray } from './custom-validators/misc' 7import { isArray } from './custom-validators/misc'
@@ -101,7 +100,7 @@ function createReqFiles (
101} 100}
102 101
103function isUserAbleToSearchRemoteURI (res: express.Response) { 102function isUserAbleToSearchRemoteURI (res: express.Response) {
104 const user: User = res.locals.oauth ? res.locals.oauth.token.User : undefined 103 const user: UserModel = res.locals.oauth ? res.locals.oauth.token.User : undefined
105 104
106 return CONFIG.SEARCH.REMOTE_URI.ANONYMOUS === true || 105 return CONFIG.SEARCH.REMOTE_URI.ANONYMOUS === true ||
107 (CONFIG.SEARCH.REMOTE_URI.USERS === true && user !== undefined) 106 (CONFIG.SEARCH.REMOTE_URI.USERS === true && user !== undefined)