Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

load_components_and_configurations fails when trying to get all components and configurations from one QM project area

Đang mở
#59 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
api, backend

Hướng nghiên cứu

Bắt đầu trong elmclient/_qm.py tại load_components_and_configurations(), được gọi bởi find_local_component(), và tái hiện lỗi 403 từ QM components endpoint khi chỉ có quyền truy cập vào một project area. Theo dõi cách yêu cầu component được tạo và xác minh rằng có thể truy xuất một component có thể truy cập mà không cần quyền đọc các project area khác.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hi there,

First of all - I am not an OSLC expert, just a user who wants to do something with this package.

Currently I am a user which has access only to some particular QM project areas (not all project areas).
So when trying to find a specific component (which is accessible to me), I use this simple code snipped:

import elmclient.server as elmserver
...

obj_server = elmserver.JazzTeamServer(str_host, str_user, str_pass, verifysslcerts=False, jtsappstring="jts:jts", appstring="qm", cachingcontrol=0)
obj_app = obj_server.find_app('qm', ok_to_create=True)
obj_project = obj_app.find_project(str_project_area_name)
obj_component = obj_project.find_local_component(str_component_name)

Which throws the following error:

Traceback (most recent call last):
  File "c:\XXX\.venv\Lib\site-packages\elmclient\_qm.py", line 296, in find_local_component
    self.load_components_and_configurations()
  File "c:\XXX\.venv\Lib\site-packages\elmclient\_qm.py", line 112, in load_components_and_configurations
    crx = self.execute_get_xml( components_uri, intent="Retrieve component definition" )
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\XXX\.venv\Lib\site-packages\elmclient\httpops.py", line 139, in execute_get_xml
    response = request.execute( **kwargs )
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\XXX\.venv\Lib\site-packages\elmclient\httpops.py", line 334, in execute
    return self._execute_request( no_error_log=no_error_log, close=close, **kwargs )
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\XXX\.venv\Lib\site-packages\elmclient\httpops.py", line 343, in _execute_request
    result = self._execute_one_request_with_login( no_error_log=no_error_log, close=close, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\XXX\.venv\Lib\site-packages\elmclient\httpops.py", line 624, in _execute_one_request_with_login
    response.raise_for_status()
  File "c:\XXX\.venv\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://host/qm/oslc_config/resources/com.ibm.team.vvc.Component

When trying to access the URL https://host/qm/oslc_config/resources/com.ibm.team.vvc.Component using my web browser, I get the following error message displayed:

The user "XXX" does not have permission to read item "_xxxxxxxxxxxxxxxxxxxxxxxx", which has the "ProjectArea" item type.

It seems that it querys all components of all project areas - including those which are not accessible for me - for some reason.
Does anybody know how to evade this issue?

Ngôn ngữ chính
HTML
Star
52
Fork
32
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của IBM/ELM-Python-Client

Tất cả issue của IBM/ELM-Python-Client

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.