"undefined < 2" evaluates to false in JS.
res.accessLevel can be undefined.
this is bad.
fix it.