mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Restrict autocompile onboarding to users in rollout (factor of 100)
This commit is contained in:
parent
6996f52195
commit
8366ea271f
1 changed files with 9 additions and 2 deletions
|
@ -252,8 +252,15 @@ module.exports = ProjectController =
|
|||
cb = underscore.once(cb)
|
||||
if !user_id?
|
||||
return cb()
|
||||
timestamp = user_id.toString().substring(0,8)
|
||||
userSignupDate = new Date( parseInt( timestamp, 16 ) * 1000 )
|
||||
|
||||
# Extract data from user's ObjectId
|
||||
timestamp = parseInt(user_id.toString().substring(0, 8), 16)
|
||||
counter = parseInt(user_id.toString().substring(18, 24), 16)
|
||||
|
||||
if counter % 5000 != 0
|
||||
# Don't show if user is not part of roll out
|
||||
return cb(null, false)
|
||||
userSignupDate = new Date(timestamp * 1000)
|
||||
if userSignupDate > new Date("2017-10-03")
|
||||
# Don't show for users who registered after it was released
|
||||
return cb(null, false)
|
||||
|
|
Loading…
Reference in a new issue