mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-30 21:44:28 +02:00
Added proper OAuth authentication for digikey and other providers
This commit is contained in:
parent
a95ba1acc4
commit
c203de082e
13 changed files with 876 additions and 19 deletions
|
@ -29,6 +29,7 @@ use App\Entity\LogSystem\CollectionElementDeleted;
|
|||
use App\Entity\LogSystem\ElementCreatedLogEntry;
|
||||
use App\Entity\LogSystem\ElementDeletedLogEntry;
|
||||
use App\Entity\LogSystem\ElementEditedLogEntry;
|
||||
use App\Entity\OAuthToken;
|
||||
use App\Entity\Parameters\AbstractParameter;
|
||||
use App\Entity\Parts\PartLot;
|
||||
use App\Entity\PriceInformations\Orderdetail;
|
||||
|
@ -344,6 +345,11 @@ class EventLoggerSubscriber implements EventSubscriber
|
|||
*/
|
||||
protected function validEntity(object $entity): bool
|
||||
{
|
||||
//Dont log OAuthTokens
|
||||
if ($entity instanceof OAuthToken) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//Dont log logentries itself!
|
||||
return $entity instanceof AbstractDBElement && !$entity instanceof AbstractLogEntry;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue