fix inclusion of js to only happen when the user can edit.