`TupleKey` should support `relation=None`
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
openfga_sdk/models/tuple_key.py の、issue で参照されている TupleKey の検証から始め、その後 read() を使ってドキュメントの例を再現します。relation を省略するか None に設定して TupleKey を構築してもエラーが発生せず、関係クエリでユーザーの関係を一覧表示できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Python
- スター
- 85
- フォーク
- 36
- 平均マージ
- 3時間 8分
- マージ済み PR(30日)
- 3
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
openfga/python-sdk のほかの issue
-
openfga/python-sdk#308 · 担当者 1 名 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
openfga/python-sdk#214 · コメント 1 件 · リアクション 1 件 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
openfga/python-sdk#194 · コメント 2 件 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 32/100
openfga/python-sdk#139 · コメント 1 件 ·
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
openfga/python-sdk#106 · コメント 2 件 ·
openfga/python-sdk の issue をすべて見る
似ている issue
-
essnmx good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
-
[Feature] 奇物选择添加优先级 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
syfoud/Simulated_Scepter#174 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Giskard-AI/giskard-oss#2840 · コメント 1 件 ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success オープンarea: repo bug perceived difficulty: 2
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
yeti-platform/yeti#1380 ·