Skip to content

Fix ticket observer can edit - #1278

Open
Herafia wants to merge 12 commits into
mainfrom
fix/ticket-observer-readonly-fields
Open

Herafia wants to merge 12 commits into
mainfrom
fix/ticket-observer-readonly-fields

Conversation

@Herafia

@Herafia Herafia commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • It fixes !46589
  • An observer on a ticket could modify and save custom fields
    because rights were only checked at the container-profile level, not against the
    specific item. Fields are now rendered as read-only for users who cannot update the
    item, and the pre_item_update hook enforces the same check server-side.

@Herafia Herafia self-assigned this Sep 29, 2026
@Herafia
Herafia force-pushed the fix/ticket-observer-readonly-fields branch from cbf1133 to bd189b5 Compare September 30, 2026 07:53
@Herafia
Herafia requested review from Rom1-B and stonebuzz September 30, 2026 07:55

@Rom1-B Rom1-B left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test covering PluginFieldsContainer::preItemUpdate() directly (e.g. a central-interface user without ticket update right but with write access on the container) asserting _plugin_fields_data is stripped/not persisted?

Comment thread inc/container.class.php
Comment thread inc/container.class.php
Comment thread inc/field.class.php
@Herafia
Herafia force-pushed the fix/ticket-observer-readonly-fields branch from 6262e88 to 83e4dc2 Compare September 30, 2026 15:26
@Herafia
Herafia requested review from Rom1-B and stonebuzz September 30, 2026 15:44
Comment thread inc/container.class.php
Comment thread tests/Units/ContainerItemRightTest.php Outdated

@Rom1-B Rom1-B left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address ALL the previous comments before requesting a review again

@Herafia
Herafia force-pushed the fix/ticket-observer-readonly-fields branch from b0870ef to 9b45100 Compare October 6, 2026 12:12
@stonebuzz

Copy link
Copy Markdown
Contributor

Please fix CI

@Herafia
Herafia force-pushed the fix/ticket-observer-readonly-fields branch from 143e2ce to 7ea9cac Compare October 12, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants