show approvals in read-only mode when Object Lock is enabled#23477
Open
f2cmb wants to merge 3 commits intoglpi-project:11.0/bugfixesfrom
Open
show approvals in read-only mode when Object Lock is enabled#23477f2cmb wants to merge 3 commits intoglpi-project:11.0/bugfixesfrom
f2cmb wants to merge 3 commits intoglpi-project:11.0/bugfixesfrom
Conversation
Contributor
Author
|
Manual backoffice testing confirmed the fix across 5 scenarios :
This validates that the READ right addition resolves the original issue where approvals were hidden in read-only contexts, while preserving proper access control for unprivileged profiles. |
trasher
reviewed
Mar 16, 2026
| // making it impossible to view validations in read-only contexts (e.g. Object Lock mode). | ||
| foreach (['ticketvalidation', 'changevalidation'] as $right_name) { | ||
| $DB->update( | ||
| 'glpi_profilerights', |
Contributor
There was a problem hiding this comment.
Usually, we do not change existing "configuration" on update. There is no reliable way to know if it's not been changed, or set on purpose.
cedric-anne
requested changes
Mar 16, 2026
Member
There was a problem hiding this comment.
This change is too important for a bugfixes version. Maybe it could be valid for the main branch, but before doing rights management changes, you should validate that @orthagh is OK with this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Ticket/Change approvals were hidden when viewing items in read-only mode (Object Lock enabled) because
CommonITILValidation::canView()required write-level rights (CREATE/VALIDATE/PURGE) which get stripped by the lock profile.Adds READ to the validation rights model so viewing approvals no longer requires write permissions.