Check for correct update operation access in location hierarchy form #800

This commit is contained in:
Paul Weidner 2024-02-13 14:52:47 -08:00
parent fb6fd0d0bc
commit 5aba80aaee
2 changed files with 6 additions and 2 deletions

View File

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Fixed
- [Check for correct update operation access in location hierarchy form #800](https://github.com/farmOS/farmOS/pull/800)
## [3.1.1] 2024-02-07
### Fixed

View File

@ -296,9 +296,9 @@ class LocationHierarchyForm extends FormBase {
// Load the asset.
$asset = $storage->load($change['asset_id']);
// If the user does not have permission to edit the asset, count it so
// If the user does not have permission to update the asset, count it so
// that we can add a warning message later, and skip it.
if (!$asset->access('edit')) {
if (!$asset->access('update')) {
$restricted_assets[] = $asset;
continue;
}