mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-23 18:21:49 +00:00
fix: auth sql store: user is owner policy, fix test
# What does this PR do? ## Test Plan # What does this PR do? ## Test Plan
This commit is contained in:
parent
81109a0f72
commit
ed8f9c03b5
5 changed files with 247 additions and 175 deletions
|
|
@ -153,7 +153,9 @@ async def test_sql_policy_consistency(mock_get_authenticated_user):
|
|||
policy_ids = set()
|
||||
for scenario in test_scenarios:
|
||||
sql_record = SqlRecord(
|
||||
record_id=scenario["id"], table_name="resources", access_attributes=scenario["access_attributes"]
|
||||
record_id=scenario["id"],
|
||||
table_name="resources",
|
||||
owner=User(principal="test-user", attributes=scenario["access_attributes"]),
|
||||
)
|
||||
|
||||
if is_action_allowed(policy, Action.READ, sql_record, user):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue