-import { getServerCommit } from '@server/helpers/utils'
+import { getServerCommit } from '@server/helpers/version'
import { CONFIG, isEmailEnabled } from '@server/initializers/config'
import { CONSTRAINTS_FIELDS, DEFAULT_THEME_NAME, PEERTUBE_VERSION } from '@server/initializers/constants'
import { isSignupAllowed, isSignupAllowedForCurrentIP } from '@server/lib/signup'
port: CONFIG.LIVE.RTMP.PORT
}
},
- videoEditor: {
- enabled: CONFIG.VIDEO_EDITOR.ENABLED
+ videoStudio: {
+ enabled: CONFIG.VIDEO_STUDIO.ENABLED
},
import: {
videos: {
torrent: {
enabled: CONFIG.IMPORT.VIDEOS.TORRENT.ENABLED
}
+ },
+ videoChannelSynchronization: {
+ enabled: CONFIG.IMPORT.VIDEO_CHANNEL_SYNCHRONIZATION.ENABLED
}
},
autoBlacklist: {
async getServerConfig (ip?: string): Promise<ServerConfig> {
const { allowed } = await Hooks.wrapPromiseFun(
isSignupAllowed,
+
{
- ip
+ ip,
+ signupMode: CONFIG.SIGNUP.REQUIRES_APPROVAL
+ ? 'request-registration'
+ : 'direct-registration'
},
- 'filter:api.user.signup.allowed.result'
+
+ CONFIG.SIGNUP.REQUIRES_APPROVAL
+ ? 'filter:api.user.request-signup.allowed.result'
+ : 'filter:api.user.signup.allowed.result'
)
const allowedForCurrentIP = isSignupAllowedForCurrentIP(ip)
allowed,
allowedForCurrentIP,
minimumAge: CONFIG.SIGNUP.MINIMUM_AGE,
+ requiresApproval: CONFIG.SIGNUP.REQUIRES_APPROVAL,
requiresEmailVerification: CONFIG.SIGNUP.REQUIRES_EMAIL_VERIFICATION
}