Hide IP addresses from activity logs not generated by the user themselves
This commit is contained in:
parent
b570769a34
commit
4aa163b76f
5 changed files with 15 additions and 18 deletions
|
@ -16,10 +16,7 @@ class ActivityLogController extends ClientApiController
|
|||
{
|
||||
$activity = QueryBuilder::for($request->user()->activity())
|
||||
->with('actor')
|
||||
->allowedFilters([
|
||||
AllowedFilter::exact('ip'),
|
||||
AllowedFilter::partial('event'),
|
||||
])
|
||||
->allowedFilters([AllowedFilter::partial('event')])
|
||||
->allowedSorts(['timestamp'])
|
||||
->paginate(min($request->query('per_page', 25), 100))
|
||||
->appends($request->query());
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue