Skip to content

feat: add REST APIs for company info #34671#34672

Draft
hassandotcms wants to merge 7 commits intomainfrom
34671-feature-basic-config-apis
Draft

feat: add REST APIs for company info #34671#34672
hassandotcms wants to merge 7 commits intomainfrom
34671-feature-basic-config-apis

Conversation

@hassandotcms
Copy link
Contributor

@hassandotcms hassandotcms commented Feb 17, 2026

Proposed Changes

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.

Checklist

  • Tests
  • Translations
  • Security Implications Contemplated (add notes if applicable)

Additional Info

** any additional useful context or info **

Screenshots

Original Updated
** original screenshot ** ** updated screenshot **

This PR fixes: #34671

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.
@hassandotcms hassandotcms linked an issue Feb 17, 2026 that may be closed by this pull request
@github-actions github-actions bot added Area : Backend PR changes Java/Maven backend code Area : CI/CD PR changes GitHub Actions/workflows labels Feb 17, 2026
@spbolton spbolton removed the Area : CI/CD PR changes GitHub Actions/workflows label Feb 17, 2026
@hassandotcms hassandotcms changed the title feat: add REST API for company locale info feat: add REST APIs for company info #34671 Feb 26, 2026
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.
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area : Backend PR changes Java/Maven backend code

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[FEATURE] Basic Config APIs

2 participants