We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd0e77c commit 72c8d3cCopy full SHA for 72c8d3c
api/ooniapi/incidents.py
@@ -96,6 +96,8 @@ def search_list_incidents() -> Response:
96
rows = list(q)
97
for r in rows:
98
r["published"] = bool(r["published"])
99
+ if account_id is None or get_client_role() != "admin":
100
+ r["email_address"] = None # hide email
101
return nocachejson(incidents=rows, v=1)
102
except BaseOONIException as e:
103
return jerror(e)
@@ -140,6 +142,8 @@ def show_incident(incident_id: str) -> Response:
140
142
return jerror("Not found")
141
143
inc = q[0]
144
inc["published"] = bool(inc["published"])
145
146
+ inc["email_address"] = None # hide email
147
# TODO: cache if possible
148
return nocachejson(incident=inc, v=1)
149
0 commit comments