`TupleKey` should support `relation=None`
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- authorization
Hướng nghiên cứu
Bắt đầu trong openfga_sdk/models/tuple_key.py, tại phần xác thực TupleKey được issue tham chiếu, sau đó tái hiện ví dụ trong tài liệu bằng read(). Hoàn thành khi việc tạo TupleKey với relation bị bỏ qua hoặc được đặt thành None không còn gây ra lỗi và truy vấn quan hệ có thể liệt kê các quan hệ của người dùng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Checklist
- I have looked into the README and have not found a suitable solution or answer.
- I have looked into the documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have upgraded to the latest version of OpenFGA and the issue still persists.
- I have searched the Slack community and have not found a suitable solution or answer.
- I agree to the terms within the OpenFGA Code of Conduct.
Description
The docs describe how to use the read() method with a TupleKey with no relation set to get a list of all relations a user has with an object. Currently the TupleKey object validation prevents the relation from being None.
Expectation
Not to throw an error when omitting relation or setting to None.
Reproduction
Essentially the code from the docs:
body = TupleKey(
user="user:bob",
object="document:123",
)
Working around the validation and submitting the query confirms the behavior describes from the docs (i.e., listing the relations) works as expected:
Issuing a query with a workaround:
body = TupleKey(
user="user:bob",
relation="",
object="document:123",
)
body._relation = None
# call `read(body)` ...
OpenFGA SDK version
0.4.0 (but the code in main appears broken)
OpenFGA version
v1.5.0
SDK Configuration
[default options]
Logs
No response
References
No response
- Ngôn ngữ chính
- Python
- Star
- 85
- Fork
- 36
- Merge trung bình
- 3 giờ 8 phút
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của openfga/python-sdk
-
openfga/python-sdk#308 · 1 người được giao ·
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
openfga/python-sdk#214 · 1 bình luận · 1 reaction ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
openfga/python-sdk#194 · 2 bình luận ·
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
openfga/python-sdk#139 · 1 bình luận ·
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
openfga/python-sdk#106 · 2 bình luận ·
Tất cả issue của openfga/python-sdk
Issue tương tự
-
[Bug] reef-hermes tells me to resume with hermes --resume, which does not work from my shell Đang mởarea: harness bug status: needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Human-Agent-Society/reef#625 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
learningequality/kolibri#15351 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Name consistency Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
eellak/triplestore#65 · 1 bình luận ·