Skip to content

Commit e4f30c5

Browse files
committed
docs: update docstring for load_filtered_policy to clarify usage
1 parent 63e203d commit e4f30c5

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

openedx_authz/engine/adapter.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,15 @@ def load_filtered_policy(self, model: Model, filter: Filter) -> None: # pylint:
100100
filter to load only relevant rules. The filtered rules are then loaded
101101
into the provided Casbin model.
102102
103+
IMPORTANT: This method is used internally by the `enforcer.load_filtered_policy()` method.
104+
Do not call this method directly. If you need to load policy rules, use the
105+
`enforcer.load_filtered_policy()` method.
106+
103107
Args:
104108
model (Model): The Casbin model to load policy rules into.
105109
filter (Filter): Filter object containing criteria for policy selection.
106-
Should have attributes like ptype, v0, v1, etc. with lists
107-
of values to filter by.
110+
Should have attributes like ptype, v0, v1, etc. with lists
111+
of values to filter by.
108112
"""
109113
queryset = CasbinRule.objects.using(self.db_alias)
110114
filtered_queryset = self.filter_query(queryset, filter)

0 commit comments

Comments
 (0)