mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-22 09:53:35 +02:00
Dont show changes to users or groups on last activity on homepage.
This commit is contained in:
parent
b2f751644a
commit
0a7bd0bffa
1 changed files with 12 additions and 4 deletions
|
@ -54,6 +54,8 @@ use App\Entity\LogSystem\CollectionElementDeleted;
|
||||||
use App\Entity\LogSystem\ElementCreatedLogEntry;
|
use App\Entity\LogSystem\ElementCreatedLogEntry;
|
||||||
use App\Entity\LogSystem\ElementDeletedLogEntry;
|
use App\Entity\LogSystem\ElementDeletedLogEntry;
|
||||||
use App\Entity\LogSystem\ElementEditedLogEntry;
|
use App\Entity\LogSystem\ElementEditedLogEntry;
|
||||||
|
use App\Entity\UserSystem\Group;
|
||||||
|
use App\Entity\UserSystem\User;
|
||||||
use App\Exceptions\EntityNotSupportedException;
|
use App\Exceptions\EntityNotSupportedException;
|
||||||
use App\Services\ElementTypeNameGenerator;
|
use App\Services\ElementTypeNameGenerator;
|
||||||
use App\Services\EntityURLGenerator;
|
use App\Services\EntityURLGenerator;
|
||||||
|
@ -272,7 +274,13 @@ class LogDataTable implements DataTableTypeInterface
|
||||||
$builder->where('log INSTANCE OF ' . ElementCreatedLogEntry::class)
|
$builder->where('log INSTANCE OF ' . ElementCreatedLogEntry::class)
|
||||||
->orWhere('log INSTANCE OF ' . ElementDeletedLogEntry::class)
|
->orWhere('log INSTANCE OF ' . ElementDeletedLogEntry::class)
|
||||||
->orWhere('log INSTANCE OF ' . ElementEditedLogEntry::class)
|
->orWhere('log INSTANCE OF ' . ElementEditedLogEntry::class)
|
||||||
->orWhere('log INSTANCE OF ' . CollectionElementDeleted::class);
|
->orWhere('log INSTANCE OF ' . CollectionElementDeleted::class)
|
||||||
|
->andWhere('log.target_type NOT IN (:disallowed)');;
|
||||||
|
|
||||||
|
$builder->setParameter('disallowed', [
|
||||||
|
AbstractLogEntry::targetTypeClassToID(User::class),
|
||||||
|
AbstractLogEntry::targetTypeClassToID(Group::class),
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($options['filter_elements'])) {
|
if (!empty($options['filter_elements'])) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue