diff --git a/CHANGELOG.md b/CHANGELOG.md index 94a14fe6..d6bdf96b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [Unreleased] + +### Fixed + +- Fix administrators losing access to a block's configuration after setting a profile to "no access" on that block. + ## [1.24.5] - 2026-09-11 ### Fixed diff --git a/front/container.form.php b/front/container.form.php index 8b715f74..6b5dafa1 100644 --- a/front/container.form.php +++ b/front/container.form.php @@ -73,12 +73,9 @@ Html::back(); } else { - if ((int) $_GET['id'] > 0) { - $right = PluginFieldsProfile::getRightOnContainer($_SESSION['glpiactiveprofile']['id'], $_GET['id']); - if ($right < READ) { - throw new AccessDeniedHttpException(); - } - } + // Admin config screen: gate with the standard "config" right, not the per-profile + // block-visibility right (which would let an admin lock himself out of the config). + $container->check((int) $_GET['id'] > 0 ? (int) $_GET['id'] : -1, READ); Html::header( __('Additional fields', 'fields'),