Skip to content

test(hydra): prove the operation filter with a permission attribute - #20

Open
schmunk42 wants to merge 1 commit into
masterfrom
feature/utils-permissions
Open

schmunk42 wants to merge 1 commit into
masterfrom
feature/utils-permissions

Conversation

@schmunk42

Copy link
Copy Markdown
Member

Summary

  • The Hydra operation filter test now uses the example permission attribute is_granted('thing:write') instead of a role name in the security expression. The repository no longer contains any role name.
  • Two regression tests prove that, for collection operations, the expression reaches the ResourceAccessChecker unchanged (asserted as a string literal) with object = null, and that the checker's answer alone decides whether the create and scan POST operations are advertised.
  • README (Security filtering (HATEOAS)): the filter is expression-neutral, this bundle defines no permissions of its own, and a voter answering a permission attribute must accept a null subject for collection operations.
  • CHANGELOG: new ## Unreleased section.

Tests and documentation only. No change under src/, config/, composer.json or .github/, no behaviour change, no tag planned.

Test plan

  • CI (PHP 8.4) green
  • git grep ROLE_ returns nothing

🤖 Generated with Claude Code

Replace the role name in the security expression of the Hydra operation
filter test with the example permission attribute is_granted('thing:write')
and add two regression tests: for collection operations the expression
reaches the ResourceAccessChecker unchanged, with object = null, and the
checker's answer decides whether the POST operations are advertised.

README and CHANGELOG (Unreleased) state that the filter is
expression-neutral and that this bundle defines no permissions of its own.
No change under src/ or config/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant