You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: person_controller.rb
    path of file: ./repos/open-build-service/src/api/app/controllers
    
    the code of the file until where you have to start completion: require 'xmlhash'

class PersonController < Applica
    
  def post_userinfo
    authorize @user, :update?

    login = params[:login]
    # just for permission checking
    User.find_by_login!(login)

    if params[:cmd] == 'change_password'
      login ||= User.session!.login
      password = request.raw_post.to_s.chomp
      if (login != User.session!.login && !User.admin_session?) || !::Configuration.passwords_changable?(User.session!)
        render_error status: 403, errorcode: 'change_password_no_permission',
                     message: "No permission to change password for user #{login}"
        return
      end