added default opts for users compile features

This commit is contained in:
Henry Oswald 2014-10-16 16:57:51 +01:00
parent 1506f86a5f
commit 5a4a90924b

View file

@ -17,8 +17,8 @@ module.exports = CompileController =
AuthenticationController.getLoggedInUserId req, (error, user_id) ->
return next(error) if error?
UserGetter.getUser user_id, {"features.compileGroup":1, "features.compileTimeout":1}, (err, user)->
settingsOverride.timeout = user.features.compileTimeout
settingsOverride.compiler = user.features.compileGroup
settingsOverride.timeout = user.features.compileTimeout || Settings.defaultFeatures.compileTimeout
settingsOverride.compiler = user.features.compileGroup || Settings.defaultFeatures.compileGroup
CompileManager.compile project_id, user_id, { isAutoCompile, settingsOverride }, (error, status, outputFiles) ->
return next(error) if error?
res.contentType("application/json")