Or let setup_user_with_permission set User.current and change the name of the function slightly to reflect setting current user.