Hide IP addresses from activity logs not generated by the user themselves

This commit is contained in:
DaneEveritt 2022-06-27 20:52:27 -04:00
parent b570769a34
commit 4aa163b76f
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
5 changed files with 15 additions and 18 deletions

View file

@ -25,10 +25,7 @@ class ActivityLogController extends ClientApiController
$activity = QueryBuilder::for($server->activity())
->with('actor')
->allowedSorts(['timestamp'])
->allowedFilters([
AllowedFilter::exact('ip'),
AllowedFilter::partial('event'),
])
->allowedFilters([AllowedFilter::partial('event')])
->when(config('activity.hide_admin_activity'), function (Builder $builder) use ($server) {
// We could do this with a query and a lot of joins, but that gets pretty
// painful so for now we'll execute a simpler query.