Erlaube berechtigten Konten, verknüpfte Originale über die Zugänge des Owners zu lesen.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
562c0848b1
commit
75a3949f7c
14 files changed
+815
-93
No files matched your search
@@ -643,7 +643,16 @@ def post_case_grant(
|
||||
if account is None:
|
||||
raise not_found()
|
||||
grant = grant_access(
|
||||
conn, principal.account_id, "case", case_id, account["id"], body.can_read, body.can_edit, body.can_share, None
|
||||
conn,
|
||||
principal.account_id,
|
||||
"case",
|
||||
case_id,
|
||||
account["id"],
|
||||
body.can_read,
|
||||
body.can_edit,
|
||||
body.can_share,
|
||||
None,
|
||||
body.use_owner_sources,
|
||||
)
|
||||
return _created(f"/api/v1/grants/{grant['id']}", {"id": str(grant["id"])})
|
||||
|
||||
@@ -908,7 +917,16 @@ def post_matter_grant(
|
||||
if account is None:
|
||||
raise not_found()
|
||||
grant = grant_access(
|
||||
conn, principal.account_id, "matter", matter_id, account["id"], body.can_read, body.can_edit, body.can_share, None
|
||||
conn,
|
||||
principal.account_id,
|
||||
"matter",
|
||||
matter_id,
|
||||
account["id"],
|
||||
body.can_read,
|
||||
body.can_edit,
|
||||
body.can_share,
|
||||
None,
|
||||
body.use_owner_sources,
|
||||
)
|
||||
return _created(f"/api/v1/grants/{grant['id']}", {"id": str(grant["id"])})
|
||||
|
||||
@@ -1785,6 +1803,8 @@ def _visible_events(conn, actor: UUID, rows: list[dict], page: Ctx) -> list[dict
|
||||
names: dict = {}
|
||||
items = []
|
||||
for event in rows:
|
||||
if event["result"] != "ok":
|
||||
continue
|
||||
title = _event_title(conn, actor, event, page)
|
||||
if title is None:
|
||||
continue
|
||||
|
||||
Reference in new issue
Block a user