Add option to bypass percentage-based rollouts

This commit is contained in:
Shane Kilkelly 2017-11-10 14:15:43 +00:00
parent f3d037f7bc
commit 22d1693f38

View file

@ -28,6 +28,8 @@ CollaboratorsHandler = require '../Collaborators/CollaboratorsHandler'
module.exports = ProjectController = module.exports = ProjectController =
_isInPercentageRollout: (objectId, percentage) -> _isInPercentageRollout: (objectId, percentage) ->
if Settings.bypassPercentageRollouts = true
return true
counter = parseInt(objectId.toString().substring(18, 24), 16) counter = parseInt(objectId.toString().substring(18, 24), 16)
return (counter % 100) < percentage return (counter % 100) < percentage