You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can evaluate policies with input data using `check_permission`.
402
+
### ⚠️ Deprecated: `check_permission()`
403
+
404
+
This method introspects the policy AST to construct a query path dynamically. It introduces unnecessary overhead and is **not recommended** for production use.
405
+
406
+
-**Synchronous**:
407
+
408
+
```python
409
+
input_data = {"user": "admin"}
410
+
policy_name ='example_policy'
411
+
rule_name ='allow'
412
+
413
+
result = client.check_permission(input_data, policy_name, rule_name)
414
+
print(result)
415
+
```
416
+
> 🔥 Prefer `query_rule()` instead for better performance and maintainability.
417
+
418
+
### ⚠️ Deprecated: `check_permission()`
419
+
420
+
-**Asynchronous**:
421
+
422
+
```python
423
+
input_data = {"user": "admin"}
424
+
policy_name ='example_policy'
425
+
rule_name ='allow'
426
+
427
+
result =await client.check_permission(input_data, policy_name, rule_name)
428
+
print(result)
429
+
```
430
+
> 🔥 Prefer `query_rule()` instead for better performance and maintainability.
0 commit comments