feat: add REST APIs for company info #34671#34672
Draft
hassandotcms wants to merge 7 commits intomainfrom
Draft
Conversation
Add POST /api/v1/configuration/_saveCompanyLocaleInfo endpoint to ConfigurationResource as a modern replacement for the legacy POST /api/config/saveCompanyLocaleInfo. Uses JSON input, proper InitBuilder auth, Swagger annotations, and delegates to CompanyManagerUtil.updateUsers for timezone validation, default user locale persistence, and JVM timezone update.
…ure-basic-config-apis
Introduce new /api/v1/company resource with 5 endpoints to replace legacy form-encoded APIs in CMSConfigResource: - GET /api/v1/company — read full company config for admin UI - PUT /api/v1/company/basic-info — save branding, portal URL, email - PUT /api/v1/company/locale-info — save language and timezone - PUT /api/v1/company/auth-type — save authentication type - POST /api/v1/company/_regenerateKey — regenerate security key Uses semantic field names instead of obfuscated Liferay model fields (e.g. primaryColor instead of type, secondaryColor instead of street). Moves _saveCompanyLocaleInfo from ConfigurationResource to the new CompanyResource for consistent API grouping.
…ure-basic-config-apis
…34671 Add 'Company Configuration' tag to DotRestApplication's OpenAPIDefinition to fix RestEndpointAnnotationValidationTest failure. Replace raw RuntimeException with DotRuntimeException in CompanyConfigHelper for proper error handling by the global exception mapper.
Add CompanyResourceIntegrationTest with 19 tests covering all 5 endpoints: GET config, PUT basic-info, PUT auth-type, PUT locale-info, POST regenerateKey. Tests verify persistence, field mapping, input validation, and admin-only access. Also add missing /dA prefix validation for backgroundImage in CompanyBasicInfoForm for consistency with loginScreenLogo and navBarLogo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Introduce new /api/v1/company resource with 5 endpoints to replace legacy form-encoded APIs in CMSConfigResource:
Uses semantic field names instead of obfuscated Liferay model fields
(e.g. primaryColor instead of type, secondaryColor instead of street).
Moves _saveCompanyLocaleInfo from ConfigurationResource to the new
CompanyResource for consistent API grouping.
Checklist
Additional Info
** any additional useful context or info **
Screenshots
This PR fixes: #34671