aglinxinyuan opened a new issue, #9329: URL: https://github.com/apache/texera/issues/9329
### Task Summary In `file-service/src/test/scala/org/apache/texera/service/resource/`, `DatasetResourcePermissionsSpec.scala` and `ModelResourcePermissionsSpec.scala` duplicate reflection scanning logic, helper methods (`endpointsOf`, `isPermitAll`, `rolesOf`), and test assertion structures verifying JAX-RS endpoint authorization: 1. Scanning public methods carrying HTTP annotations (`@HttpMethod`). 2. Validating that every endpoint carries mutually exclusive `@PermitAll` or `@RolesAllowed` annotations. 3. Asserting that non-public endpoints are restricted to `REGULAR` and `ADMIN` roles. 4. Verifying that documented public read endpoints carry `@PermitAll`. Extract shared endpoint permission test behaviors into a reusable `ResourcePermissionsBehaviors` trait to eliminate duplicate boilerplate while strictly preserving every test contract and assertion name. ### Task Type - [x] Refactor / Cleanup - [x] Testing / QA -- 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]
