Repository navigation
refactor: centralize user security context, rename rate limiters, and… - #337
Conversation
… clean up utility boundaries - Deprecates and removes the custom `@CurrentUser` annotation. - Introduces `SecurityContextService` to centralize authentications and hibernate-managed user entity resolution, refactoring user and document web controllers accordingly. - Renames the subscription-aware request throttlers from generic `RateLimit*` to `AiRateLimit*` (e.g., `AiRateLimitService`, `AiRateLimitInterceptor`) to avoid collisions with the billing-oriented `AiQuotaService`. - Rebrands the action-based throttler (`GeneralRateLimitService`) as the primary `RateLimitService`. - Inlines file validation rules from `ValidateFileCheck` directly into `FileUploadValidationUtil` and deletes `ValidateFileCheck` to resolve a modular circular dependency (`core` -> `extraction` -> `core`). - Relocates log sanitization logic from `extraction.documents.utils.SanitizeLogging` to a core base class `core.utils.logging.SanitizeLogging` while retaining a deprecated subclass shell to preserve backward compatibility for existing imports. - Corrects all corresponding unit tests and verifies compiling successfully with a clean build. Signed-off-by: aniebietafia <aniebietafia87@gmail.com>
|
Important Review skippedToo many files! This PR contains 312 files, which is 162 over the limit of 150. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (312)
You can disable this status message by setting the Use the checkbox below for a quick retry:
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
|
|
| @Parameter(description = "Enable encryption (premium feature)") | ||
| @RequestParam(value = "enableEncryption", defaultValue = "false") boolean enableEncryption, |
Signed-off-by: aniebietafia <aniebietafia87@gmail.com>
|
|
… clean up utility boundaries
@CurrentUserannotation.SecurityContextServiceto centralize authentications and hibernate-managed user entity resolution, refactoring user and document web controllers accordingly.RateLimit*toAiRateLimit*(e.g.,AiRateLimitService,AiRateLimitInterceptor) to avoid collisions with the billing-orientedAiQuotaService.GeneralRateLimitService) as the primaryRateLimitService.ValidateFileCheckdirectly intoFileUploadValidationUtiland deletesValidateFileCheckto resolve a modular circular dependency (core->extraction->core).extraction.documents.utils.SanitizeLoggingto a core base classcore.utils.logging.SanitizeLoggingwhile retaining a deprecated subclass shell to preserve backward compatibility for existing imports.