Compare commits

...

16 Commits

Author SHA1 Message Date
Jan Böhmer
78b1d41cf8 Merge remote-tracking branch 'origin/master' 2026-03-05 00:22:11 +01:00
Jan Böhmer
616c3a6742 Bumped version to 2.8.1 2026-03-05 00:22:08 +01:00
Copilot
d24a50a696 Auto-upload built assets as release attachments on version tag push (#1287)
* Initial plan

* Upload built assets as release attachments on version tag push

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
2026-03-05 00:04:16 +01:00
Jan Böhmer
3480dd146e Do not use customer reference for digikey barcode creation info as it likely contains not the part number
Fixes #1285
2026-03-05 00:02:35 +01:00
Jan Böhmer
dbe49b5f00 Merge remote-tracking branch 'origin/master' 2026-03-04 23:58:47 +01:00
Jan Böhmer
1c28efb12e Updated dependencies 2026-03-04 23:58:41 +01:00
Jan Böhmer
a6ee68d75a Ensure that user has read permission to part and category to prevent IPN info leakage
issue #1283
2026-03-04 23:54:18 +01:00
Jan Böhmer
30ece64423 Update KiCad symbols and footprints lists (#1282)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-04 23:39:26 +01:00
dependabot[bot]
77ef77961d Bump actions/upload-artifact from 6 to 7 (#1277)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-04 23:38:48 +01:00
dependabot[bot]
a629949479 Bump actions/download-artifact from 7 to 8 (#1278)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7 to 8.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-04 23:38:32 +01:00
Jan Böhmer
af6ddffa1d Check that user has general access rights to partdb
See #1283
2026-03-04 23:38:06 +01:00
Jan Böhmer
f15979ed11 Run cache:pool:clear --all instead of cache:clear in updater to clear really all cache pools, even app ones 2026-03-04 23:33:10 +01:00
Jan Böhmer
df3262a3f7 Moved cache.settings to cache.system adapter to ensure it is cleared on updating
Fixes #1279
2026-03-04 23:31:16 +01:00
Jan Böhmer
a071701870 Add cache pool clear hint to error pages
Related to #1279
2026-03-04 23:27:06 +01:00
Jan Böhmer
c549665578 Fixed flash messages in admin pages 2026-03-04 23:24:29 +01:00
Jan Böhmer
2137eecddf Check for good measure again, that a user is able to edit an entity in an admin form
issue #1283
2026-03-04 23:06:01 +01:00
17 changed files with 770 additions and 754 deletions

View File

@@ -8,6 +8,9 @@ on:
branches:
- '*'
- "!l10n_*" # Dont test localization branches
tags:
- 'v*.*.*'
- 'v*.*.*-**'
pull_request:
branches:
- '*'
@@ -17,6 +20,8 @@ jobs:
assets_artifact_build:
name: Build assets artifact
runs-on: ubuntu-22.04
permissions:
contents: write
env:
APP_ENV: prod
@@ -80,13 +85,20 @@ jobs:
run: zip -r /tmp/partdb_assets.zip public/build/ vendor/
- name: Upload assets artifact
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
with:
name: Only dependencies and built assets
path: /tmp/partdb_assets.zip
- name: Upload full artifact
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
with:
name: Full Part-DB including dependencies and built assets
path: /tmp/partdb_with_assets.zip
- name: Upload assets as release attachment
if: startsWith(github.ref, 'refs/tags/')
run: |
gh release upload "${{ github.ref_name }}" /tmp/partdb_assets.zip /tmp/partdb_with_assets.zip --clobber
env:
GH_TOKEN: ${{ github.token }}

View File

@@ -98,7 +98,7 @@ jobs:
-
name: Upload digest
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
with:
name: digests-${{ matrix.platform-slug }}
path: /tmp/digests/*
@@ -113,7 +113,7 @@ jobs:
steps:
-
name: Download digests
uses: actions/download-artifact@v7
uses: actions/download-artifact@v8
with:
path: /tmp/digests
pattern: digests-*

View File

@@ -99,7 +99,7 @@ jobs:
-
name: Upload digest
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
with:
name: digests-${{ matrix.platform-slug }}
path: /tmp/digests/*
@@ -114,7 +114,7 @@ jobs:
steps:
-
name: Download digests
uses: actions/download-artifact@v7
uses: actions/download-artifact@v8
with:
path: /tmp/digests
pattern: digests-*

View File

@@ -1 +1 @@
2.8.0
2.8.1

44
composer.lock generated
View File

@@ -4130,16 +4130,16 @@
},
{
"name": "dompdf/dompdf",
"version": "v3.1.4",
"version": "v3.1.5",
"source": {
"type": "git",
"url": "https://github.com/dompdf/dompdf.git",
"reference": "db712c90c5b9868df3600e64e68da62e78a34623"
"reference": "f11ead23a8a76d0ff9bbc6c7c8fd7e05ca328496"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/dompdf/dompdf/zipball/db712c90c5b9868df3600e64e68da62e78a34623",
"reference": "db712c90c5b9868df3600e64e68da62e78a34623",
"url": "https://api.github.com/repos/dompdf/dompdf/zipball/f11ead23a8a76d0ff9bbc6c7c8fd7e05ca328496",
"reference": "f11ead23a8a76d0ff9bbc6c7c8fd7e05ca328496",
"shasum": ""
},
"require": {
@@ -4188,9 +4188,9 @@
"homepage": "https://github.com/dompdf/dompdf",
"support": {
"issues": "https://github.com/dompdf/dompdf/issues",
"source": "https://github.com/dompdf/dompdf/tree/v3.1.4"
"source": "https://github.com/dompdf/dompdf/tree/v3.1.5"
},
"time": "2025-10-29T12:43:30+00:00"
"time": "2026-03-03T13:54:37+00:00"
},
{
"name": "dompdf/php-font-lib",
@@ -9502,16 +9502,16 @@
},
{
"name": "sabberworm/php-css-parser",
"version": "v9.2.0",
"version": "v9.3.0",
"source": {
"type": "git",
"url": "https://github.com/MyIntervals/PHP-CSS-Parser.git",
"reference": "59373045e11ad47b5c18fc615feee0219e42f6d3"
"reference": "88dbd0f7f91abbfe4402d0a3071e9ff4d81ed949"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/59373045e11ad47b5c18fc615feee0219e42f6d3",
"reference": "59373045e11ad47b5c18fc615feee0219e42f6d3",
"url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/88dbd0f7f91abbfe4402d0a3071e9ff4d81ed949",
"reference": "88dbd0f7f91abbfe4402d0a3071e9ff4d81ed949",
"shasum": ""
},
"require": {
@@ -9538,7 +9538,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "9.3.x-dev"
"dev-main": "9.4.x-dev"
}
},
"autoload": {
@@ -9576,9 +9576,9 @@
],
"support": {
"issues": "https://github.com/MyIntervals/PHP-CSS-Parser/issues",
"source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v9.2.0"
"source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v9.3.0"
},
"time": "2026-02-21T17:12:03+00:00"
"time": "2026-03-03T17:31:43+00:00"
},
{
"name": "sabre/uri",
@@ -19148,12 +19148,12 @@
"source": {
"type": "git",
"url": "https://github.com/Roave/SecurityAdvisories.git",
"reference": "89525190c449738e468ee27e77f9fdc1bc160e08"
"reference": "da19d9c4572f2adae57b28b2111d7fa667cd6dcb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/89525190c449738e468ee27e77f9fdc1bc160e08",
"reference": "89525190c449738e468ee27e77f9fdc1bc160e08",
"url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/da19d9c4572f2adae57b28b2111d7fa667cd6dcb",
"reference": "da19d9c4572f2adae57b28b2111d7fa667cd6dcb",
"shasum": ""
},
"conflict": {
@@ -19282,7 +19282,7 @@
"commerceteam/commerce": ">=0.9.6,<0.9.9",
"components/jquery": ">=1.0.3,<3.5",
"composer/composer": "<1.10.27|>=2,<2.2.26|>=2.3,<2.9.3",
"concrete5/concrete5": "<9.4.3",
"concrete5/concrete5": "<9.4.8",
"concrete5/core": "<8.5.8|>=9,<9.1",
"contao-components/mediaelement": ">=2.14.2,<2.21.1",
"contao/comments-bundle": ">=2,<4.13.40|>=5.0.0.0-RC1-dev,<5.3.4",
@@ -19296,7 +19296,7 @@
"cosenary/instagram": "<=2.3",
"couleurcitron/tarteaucitron-wp": "<0.3",
"cpsit/typo3-mailqueue": "<0.4.3|>=0.5,<0.5.1",
"craftcms/cms": "<4.17.0.0-beta1|>=5,<5.9.0.0-beta1",
"craftcms/cms": "<4.17.0.0-beta2|>=5,<5.9.0.0-beta2",
"craftcms/commerce": ">=4.0.0.0-RC1-dev,<=4.10|>=5,<=5.5.1",
"craftcms/composer": ">=4.0.0.0-RC1-dev,<=4.10|>=5.0.0.0-RC1-dev,<=5.5.1",
"craftcms/craft": ">=3.5,<=4.16.17|>=5.0.0.0-RC1-dev,<=5.8.21",
@@ -19454,7 +19454,7 @@
"friendsoftypo3/openid": ">=4.5,<4.5.31|>=4.7,<4.7.16|>=6,<6.0.11|>=6.1,<6.1.6",
"froala/wysiwyg-editor": "<=4.3",
"frosh/adminer-platform": "<2.2.1",
"froxlor/froxlor": "<=2.2.5",
"froxlor/froxlor": "<=2.3.3",
"frozennode/administrator": "<=5.0.12",
"fuel/core": "<1.8.1",
"funadmin/funadmin": "<=7.1.0.0-RC4",
@@ -19504,7 +19504,7 @@
"ibexa/solr": ">=4.5,<4.5.4",
"ibexa/user": ">=4,<4.4.3|>=5,<5.0.4",
"icecoder/icecoder": "<=8.1",
"idno/known": "<=1.6.2",
"idno/known": "<1.6.4",
"ilicmiljan/secure-props": ">=1.2,<1.2.2",
"illuminate/auth": "<5.5.10",
"illuminate/cookie": ">=4,<=4.0.11|>=4.1,<6.18.31|>=7,<7.22.4",
@@ -19554,7 +19554,7 @@
"kelvinmo/simplexrd": "<3.1.1",
"kevinpapst/kimai2": "<1.16.7",
"khodakhah/nodcms": "<=3",
"kimai/kimai": "<2.46",
"kimai/kimai": "<=2.50",
"kitodo/presentation": "<3.2.3|>=3.3,<3.3.4",
"klaviyo/magento2-extension": ">=1,<3",
"knplabs/knp-snappy": "<=1.4.2",
@@ -20167,7 +20167,7 @@
"type": "tidelift"
}
],
"time": "2026-03-01T01:36:02+00:00"
"time": "2026-03-04T22:09:37+00:00"
},
{
"name": "sebastian/cli-parser",

View File

@@ -25,5 +25,5 @@ framework:
adapter: cache.app
cache.settings:
adapter: cache.app
adapter: cache.system
tags: true

View File

@@ -1,4 +1,4 @@
# Generated on Sun Mar 1 11:46:09 UTC 2026
# Generated on Tue Mar 3 14:26:21 UTC 2026
# This file contains all footprints available in the offical KiCAD library
Audio_Module:Reverb_BTDR-1H
Audio_Module:Reverb_BTDR-1V

View File

@@ -1,4 +1,4 @@
# Generated on Sun Mar 1 11:46:51 UTC 2026
# Generated on Tue Mar 3 14:27:05 UTC 2026
# This file contains all symbols available in the offical KiCAD library
4xxx:14528
4xxx:14529
@@ -20842,6 +20842,9 @@ Sensor_Pressure:40PC015G
Sensor_Pressure:40PC100G
Sensor_Pressure:40PC150G
Sensor_Pressure:40PC250G
Sensor_Pressure:ABPxxxxxxxxx0
Sensor_Pressure:ABPxxxxxxxxxA
Sensor_Pressure:ABPxxxxxxxxxS
Sensor_Pressure:BMP280
Sensor_Pressure:ILPS28QSW
Sensor_Pressure:LPS22DF

View File

@@ -195,6 +195,8 @@ abstract class BaseAdminController extends AbstractController
$this->commentHelper->setMessage($form['log_comment']->getData());
//In principle, the form should be disabled, if the edit permission is not granted, but for good measure, we also check it here, before saving changes.
$this->denyAccessUnlessGranted('edit', $entity);
$em->persist($entity);
$em->flush();
$this->addFlash('success', 'entity.edit_flash');

View File

@@ -71,7 +71,10 @@ class TypeaheadController extends AbstractController
#[Route(path: '/builtInResources/search', name: 'typeahead_builtInRessources')]
public function builtInResources(Request $request, BuiltinAttachmentsFinder $finder): JsonResponse
{
$query = $request->get('query');
//Ensure that the user can access Part-DB at all
$this->denyAccessUnlessGranted('HAS_ACCESS_PERMISSIONS');
$query = $request->query->getString('query');
$array = $finder->find($query);
$result = [];
@@ -205,9 +208,16 @@ class TypeaheadController extends AbstractController
/** @var Category|null $category */
$category = $entityManager->getRepository(Category::class)->find($categoryId);
//Ensure the user has access to both the part and the category
$this->denyAccessUnlessGranted('read', $part);
if ($category !== null) {
$this->denyAccessUnlessGranted('read', $category);
}
$clonedPart = clone $part;
$clonedPart->setCategory($category);
$partRepository = $entityManager->getRepository(Part::class);
$ipnSuggestions = $partRepository->autoCompleteIpn($clonedPart, $description, $this->ipnSuggestSettings->suggestPartDigits);

View File

@@ -121,6 +121,7 @@ class BaseEntityAdminForm extends AbstractType
'label' => 'entity.edit.alternative_names.label',
'help' => 'entity.edit.alternative_names.help',
'empty_data' => null,
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
'attr' => [
'class' => 'tagsinput',
'data-controller' => 'elements--tagsinput',

View File

@@ -304,11 +304,11 @@ final readonly class BarcodeScanResultHandler
return null;
}
// Digi-Key: can use customerPartNumber or supplierPartNumber directly
// Digi-Key: supplierPartNumber directly
if ($vendor === 'digikey') {
return [
'providerKey' => 'digikey',
'providerId' => $scanResult->customerPartNumber ?? $scanResult->supplierPartNumber,
'providerId' => $scanResult->supplierPartNumber ?? throw new \RuntimeException('Digikey barcode does not contain required supplier part number'),
];
}
@@ -316,7 +316,7 @@ final readonly class BarcodeScanResultHandler
if ($vendor === 'element14') {
return [
'providerKey' => 'element14',
'providerId' => $scanResult->supplierPartNumber,
'providerId' => $scanResult->supplierPartNumber ?? throw new \RuntimeException('Element14 barcode does not contain required supplier part number'),
];
}

View File

@@ -420,7 +420,7 @@ class UpdateExecutor
// Step 11: Clear cache
$stepStart = microtime(true);
$this->runCommand([
'php', 'bin/console', 'cache:clear',
'php', 'bin/console', 'cache:pool:clear', '--all',
'--env=prod',
'--no-interaction',
], 'Clear cache', 120);
@@ -489,7 +489,7 @@ class UpdateExecutor
// Clear cache after rollback
$this->runCommand([
'php', 'bin/console', 'cache:clear',
'php', 'bin/console', 'cache:pool:clear', '--all',
'--env=prod',
], 'Clear cache after rollback', 120);
$log('rollback_cache', 'Cleared cache after rollback', true);

View File

@@ -1,23 +1,19 @@
{% block flashes %}
{# Insert flashes #}
<turbo-stream action="replace" action="morph" target="toast-container">
<turbo-stream action="update" action="morph" target="toast-container">
<template>
<div class="toast-container" id="toast-container">
{% for label, messages in app.flashes() %}
{% for message in messages %}
{{ include('_toast.html.twig', {
'label': label,
'message': message
}) }}
{% endfor %}
{% for label, messages in app.flashes() %}
{% for message in messages %}
{{ include('_toast.html.twig', {
'label': label,
'message': message
}) }}
{% endfor %}
</div>
{% endfor %}
</template>
</turbo-stream>
{% endblock %}
{# Insert info about when the sidebar trees were updated last time, so the sidebar_tree_controller can decide if it needs to reload the tree #}
<span id="sidebar-last-time-updated" style="display: none;" data-last-update="{{ sidebar_tree_updater.lastTreeUpdate.format("Y-m-d\\TH:i:sP") }}"></span>

View File

@@ -195,10 +195,7 @@
{% endif %}
</div>
</fieldset>
{# Include turbo control things, so we can still control page title and reloading #}
{% include "_turbo_control.html.twig" %}
</turbo-frame>
</div>
</div>
{% endblock %}
{% endblock %}

View File

@@ -17,7 +17,7 @@
<b><i>Can not load frontend assets.</i></b><p>Try following things:</p>
<ul>
<li>Run <kbd>yarn install</kbd> and <kbd>yarn build</kbd> in Part-DB folder.</li>
<li>Run <kbd>php bin/console cache:clear</kbd></li>
<li>Run <kbd>php bin/console cache:clear</kbd> and <kbd>php bin/console cache:pool:clear --all</kbd></li>
</ul>
{% elseif exception.class == "Doctrine\\DBAL\\Exception\\InvalidFieldNameException"
or exception.class == "Doctrine\\DBAL\\Exception\\TableNotFoundException"
@@ -26,21 +26,21 @@
<ul>
<li>Check if the <code>DATABASE_URL</code> in <code>.env.local</code> (or docker configure) is correct</li>
<li>Run <kbd>php bin/console doctrine:migrations:migrate</kbd> to upgrade database schema</li>
<li>Run <kbd>php bin/console cache:clear</kbd></li>
<li>Run <kbd>php bin/console cache:clear</kbd> and <kbd>php bin/console cache:pool:clear --all</kbd></li>
</ul>
{% elseif exception.class == "Doctrine\\DBAL\\Exception\\DriverException" %}
<b><i>Error while executing database query.</i></b><br>This is maybe caused by an old database schema.<br><p>Try following things:</p>
<ul>
<li>Check if the <code>DATABASE_URL</code> in <code>.env.local</code> (or docker configure) is correct</li>
<li>Run <kbd>php bin/console doctrine:migrations:migrate</kbd> to upgrade database schema (if upgrade is available)</li>
<li>Run <kbd>php bin/console cache:clear</kbd></li>
<li>Run <kbd>php bin/console cache:clear</kbd> and <kbd>php bin/console cache:pool:clear --all</kbd></li>
<li>If this issue persist, create a ticket at <a href="https://github.com/Part-DB/Part-DB-symfony/issues" rel="noopener">GitHub</a>.</li>
</ul>
{% else %}
You could try following things, if this error is unexpected:
<ul>
<li>Check <code>var/log/prod.log</code> (or <code>docker logs</code> when Part-DB is running inside a docker container) for additional informations</li>
<li>Run <kbd>php bin/console cache:clear</kbd> to clear cache</li>
<li>Run <kbd>php bin/console cache:clear</kbd> and <kbd>php bin/console cache:pool:clear --all</kbd> to clear caches</li>
</ul>
{% endif %}
{% endblock %}
{% endblock %}

1385
yarn.lock

File diff suppressed because it is too large Load Diff