Fix locked check, which was totally broken, resulting in weird 403s

Fixes #2048
Merge branch 'staging'

Conflicts:
	app/assets/javascripts/config/routes.js => app/assets/config/route.js