mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-03 10:49:21 -05:00
refac
This commit is contained in:
@@ -566,11 +566,9 @@ async def update_tool_access_by_id(
|
||||
)
|
||||
):
|
||||
form_data.access_grants = [
|
||||
g for g in form_data.access_grants
|
||||
if not (
|
||||
g.get("principal_type") == "user"
|
||||
and g.get("principal_id") == "*"
|
||||
)
|
||||
grant
|
||||
for grant in form_data.access_grants
|
||||
if not (grant.get("principal_type") == "user" and grant.get("principal_id") == "*")
|
||||
]
|
||||
|
||||
AccessGrants.set_access_grants("tool", id, form_data.access_grants, db=db)
|
||||
|
||||
Reference in New Issue
Block a user