tercul-backend/internal/app
google-labs-jules[bot] f675c98e80 Fix: Correct authorization logic in integration tests
The integration tests for admin-only mutations were failing due to an authorization issue. The root cause was that the JWT token used in the tests did not reflect the user's admin role, which was being set directly in the database.

This commit fixes the issue by:
1.  Updating the `CreateAuthenticatedUser` test helper to generate a new JWT token after a user's role is changed. This ensures the token contains the correct, up-to-date role.
2.  Removing all uses of `auth.ContextWithAdminUser` from the integration tests, making the JWT token the single source of truth for authorization.

This change also removes unused imports and variables that were causing build failures after the refactoring. All integration tests now pass.
2025-10-04 23:48:44 +00:00
..
analytics refactor(domain): Isolate Work aggregate 2025-10-03 16:15:09 +00:00
auth Refactor: Introduce service layer for application logic 2025-09-09 02:28:25 +00:00
author refactor: Align codebase with DDD architecture to fix build 2025-10-03 01:17:53 +00:00
authz Fix: Correct authorization logic in integration tests 2025-10-04 23:48:44 +00:00
book Fix: Correct authorization logic in integration tests 2025-10-04 23:48:44 +00:00
bookmark refactor: Refactor GraphQL tests to use mock-based unit tests 2025-10-03 09:21:41 +00:00
category Refactor: Introduce service layer for application logic 2025-09-09 02:28:25 +00:00
collection This commit refactors the GraphQL layer to improve code quality and adhere to the project's target architecture. 2025-10-03 02:13:12 +00:00
comment feat: Implement production-ready API patterns 2025-10-04 18:16:08 +00:00
copyright refactor(domain): Isolate Work aggregate 2025-10-03 16:15:09 +00:00
like refactor: Refactor GraphQL tests to use mock-based unit tests 2025-10-03 09:21:41 +00:00
localization feat: Finalize DDD refactoring and fix tests 2025-10-03 01:44:47 +00:00
monetization refactor(domain): Isolate Work aggregate 2025-10-03 16:15:09 +00:00
search refactor(domain): Isolate Work aggregate 2025-10-03 16:15:09 +00:00
tag Refactor: Introduce service layer for application logic 2025-09-09 02:28:25 +00:00
translation Fix: Correct authorization logic in integration tests 2025-10-04 23:48:44 +00:00
user Fix: Correct authorization logic in integration tests 2025-10-04 23:48:44 +00:00
work Fix: Correct authorization logic in integration tests 2025-10-04 23:48:44 +00:00
.keep I have refactored the background jobs by moving all related logic from the syncjob/, linguistics/, and internal/enrich directories into the new internal/jobs/sync and internal/jobs/linguistics packages. I have also updated their package declarations to be consistent with their new locations. 2025-09-02 15:02:04 +00:00
app.go Fix: Correct authorization logic in integration tests 2025-10-04 23:48:44 +00:00