File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,8 @@ def search_list_incidents() -> Response:
9696 rows = list (q )
9797 for r in rows :
9898 r ["published" ] = bool (r ["published" ])
99+ if account_id is None or get_client_role () != "admin" :
100+ r ["email_address" ] = None # hide email
99101 return nocachejson (incidents = rows , v = 1 )
100102 except BaseOONIException as e :
101103 return jerror (e )
@@ -140,6 +142,8 @@ def show_incident(incident_id: str) -> Response:
140142 return jerror ("Not found" )
141143 inc = q [0 ]
142144 inc ["published" ] = bool (inc ["published" ])
145+ if account_id is None or get_client_role () != "admin" :
146+ inc ["email_address" ] = None # hide email
143147 # TODO: cache if possible
144148 return nocachejson (incident = inc , v = 1 )
145149 except BaseOONIException as e :
You can’t perform that action at this time.
0 commit comments