aglinxinyuan opened a new pull request, #9330:
URL: https://github.com/apache/texera/pull/9330

   ### What changes were proposed in this pull request?
   
   Extract shared JAX-RS endpoint permission reflection scanning and 
authorization assertions between `DatasetResourcePermissionsSpec` and 
`ModelResourcePermissionsSpec` into a reusable 
`ResourcePermissionsSpecBehaviors` trait in `file-service`.
   
   | Surface | Pinned |
   | --- | --- |
   | Reflection scanning | `endpointsOf` scans `@HttpMethod` annotated 
endpoints |
   | Endpoint annotation rules | Exactly one of `@PermitAll` or `@RolesAllowed` 
per endpoint |
   | Non-public restrictions | `@RolesAllowed` requires `REGULAR` and `ADMIN` |
   | Public read endpoints | Documented hub reads verified `@PermitAll` |
   | Test names & suites | 9 tests across 2 suites identical before and after |
   
   ### Any related issues or pull requests?
   
   Closes #9329.
   
   ### How was this PR tested?
   
   Ran `FileService/testOnly 
org.apache.texera.service.resource.DatasetResourcePermissionsSpec 
org.apache.texera.service.resource.ModelResourcePermissionsSpec` via sbt:
   - `DatasetResourcePermissionsSpec`: 4 tests passed (0 failures, 0 errors)
   - `ModelResourcePermissionsSpec`: 5 tests passed (0 failures, 0 errors)
   - Total: 9 tests passed.
   
   Ran linters:
   - `sbt "FileService/scalafmtCheck" "FileService/Test/scalafmtCheck"` passed.
   - `sbt "FileService/scalafix --check" "FileService/Test/scalafix --check"` 
passed.
   
   Mutation check:
   - Injected an unannotated/invalid endpoint into the expected public set in 
`DatasetResourcePermissionsSpec`; the suite failed with expected failure 
`public endpoints missing from DatasetResource (renamed?): ...`. Reverted 
cleanly.
   
   ### AI tooling
   
   Generated-by: Antigravity (gemini-2.5-pro).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to