Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.4] - 2026-08-06

### Fixed
Expand Down
11 changes: 3 additions & 8 deletions front/container.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
* -------------------------------------------------------------------------
*/

use Glpi\Exception\Http\AccessDeniedHttpException;

Session::checkLoginUser();

if (empty($_GET['id'])) {
Expand Down Expand Up @@ -63,12 +61,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'),
Expand Down