Add ability to list all local videos
Including private/unlisted for moderators/admins
This commit is contained in:
parent
b014b6b9c7
commit
1cd3facc3d
17 changed files with 363 additions and 54 deletions
|
@ -2,7 +2,6 @@ import * as express from 'express'
|
|||
import * as multer from 'multer'
|
||||
import { CONFIG, REMOTE_SCHEME } from '../initializers'
|
||||
import { logger } from './logger'
|
||||
import { User } from '../../shared/models/users'
|
||||
import { deleteFileAsync, generateRandomString } from './utils'
|
||||
import { extname } from 'path'
|
||||
import { isArray } from './custom-validators/misc'
|
||||
|
@ -101,7 +100,7 @@ function createReqFiles (
|
|||
}
|
||||
|
||||
function isUserAbleToSearchRemoteURI (res: express.Response) {
|
||||
const user: User = res.locals.oauth ? res.locals.oauth.token.User : undefined
|
||||
const user: UserModel = res.locals.oauth ? res.locals.oauth.token.User : undefined
|
||||
|
||||
return CONFIG.SEARCH.REMOTE_URI.ANONYMOUS === true ||
|
||||
(CONFIG.SEARCH.REMOTE_URI.USERS === true && user !== undefined)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue