Closed satishTeachmint closed 9 months ago
@satishTeachmint šš» which versions of SpiceDB and authzed-py
are you using? The report indicates SpiceDB 0.12.0
, which I assume is not right and you are referring to authzed-py
.
I was able to reproduce this when using authzed-py
0.12.0
. BulkCheck is available in 0.13.0
.
Here is an example that uses it:
from authzed.api.v1 import (
BulkCheckPermissionRequest,
BulkCheckPermissionRequestItem,
Client,
Consistency,
ObjectReference, SubjectReference,
)
from grpcutil import insecure_bearer_token_credentials
if __name__ == '__main__':
client = Client("localhost:50051", insecure_bearer_token_credentials("foobar"))
req = BulkCheckPermissionRequest(
consistency=Consistency(fully_consistent=True),
items=[
BulkCheckPermissionRequestItem(
resource=ObjectReference(
object_type="book",
object_id="1984"
),
permission="view",
subject=SubjectReference(
object=ObjectReference(
object_type="user",
object_id="jane"
),
),
)
],
)
resp = client.BulkCheckPermission(req)
print(resp)
What platforms are affected?
macos
What architectures are affected?
others
What SpiceDB version are you using?
0.12.0
Steps to Reproduce
while importing the following module I'm not able to import those. as they are not defined in init in authzed/api/v1/init.py.
even though I define it gives the below error. Please resolve this error.
Expected Result
I can use the following code properly
resp = client.BulkCheckPermission(BulkCheckPermissionRequest(items=permisions_array))
Actual Result
getting below error