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: versions_api.rb
    path of file: ./repos/openproject/lib/api/v3/versions
    
    the code of the file until where you have to start completion: #-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012
    
              def authorized_for_version?(version)
                projects = version.projects

                permissions = %i(view_work_packages manage_versions)

                authorize_in_projects(permissions, projects:) do
                  raise ::API::Errors::NotFound.new
                end
              end