diff --git a/backend/modules.go b/backend/modules.go index f1d684806..2f1228312 100644 --- a/backend/modules.go +++ b/backend/modules.go @@ -107,9 +107,9 @@ func initModules(db *gorm.DB, cfg *config) *modules { configMod := appconfig.NewModule(db, cipher, cfg.uploadDir) mailMod := mail.NewModule(configMod.Store()) configMod.SetMailer(mailMod.Service()) - // White-labeling renders only under an MSSP license (resolved from billing). + // White-labeling renders only under an Enterprise license (resolved from billing). configMod.SetWhiteLabelEntitlement(func() bool { - return billingMod.License().Current().IsMSSP() + return billingMod.License().Current().IsEnterprise() }) brand := configMod.Branding() complianceMod := compliance.NewModule(db, mailMod.Service(), complianceBranding{uc: brand, uploadDir: cfg.uploadDir}, diff --git a/backend/modules/appconfig/routes.go b/backend/modules/appconfig/routes.go index c6b322501..677950e4f 100644 --- a/backend/modules/appconfig/routes.go +++ b/backend/modules/appconfig/routes.go @@ -5,7 +5,7 @@ import ( "github.com/utmstack/utmstack/backend/pkg/http/middleware" ) -func RegisterRoutes(api *gin.RouterGroup, m *Module, userAuth gin.HandlerFunc, mssp gin.HandlerFunc) { +func RegisterRoutes(api *gin.RouterGroup, m *Module, userAuth gin.HandlerFunc, enterprise gin.HandlerFunc) { // Public, read-only display preference (timezone + date format). Non-sensitive, // consumed app-wide (incl. pre-login) to render timestamps consistently. api.GET("/date-format", m.Handler().DateFormat) @@ -18,8 +18,8 @@ func RegisterRoutes(api *gin.RouterGroup, m *Module, userAuth gin.HandlerFunc, m b := api.Group("/branding") b.GET("", userAuth, middleware.RequirePermission("config.read"), m.BrandingHandler().Get) - b.PUT("", userAuth, mssp, middleware.RequirePermission("config.write"), m.BrandingHandler().Update) - b.POST("/assets/:slot", userAuth, mssp, middleware.RequirePermission("config.write"), m.BrandingHandler().UploadAsset) + b.PUT("", userAuth, enterprise, middleware.RequirePermission("config.write"), m.BrandingHandler().Update) + b.POST("/assets/:slot", userAuth, enterprise, middleware.RequirePermission("config.write"), m.BrandingHandler().UploadAsset) b.GET("/public", m.BrandingHandler().Public) b.POST("/seed", userAuth, middleware.RequireInternal(), m.BrandingHandler().Seed) } diff --git a/backend/modules/appconfig/usecase/branding.go b/backend/modules/appconfig/usecase/branding.go index 8cd9552f8..aca4ee369 100644 --- a/backend/modules/appconfig/usecase/branding.go +++ b/backend/modules/appconfig/usecase/branding.go @@ -12,7 +12,7 @@ import ( "github.com/utmstack/utmstack/backend/modules/appconfig/dto" ) -var ErrWhiteLabelNotEntitled = errors.New("white-labeling requires an MSSP license") +var ErrWhiteLabelNotEntitled = errors.New("white-labeling requires an enterprise license") var ErrUnknownAssetSlot = errors.New("unknown branding asset slot") const ( diff --git a/backend/server.go b/backend/server.go index 5a6c7b5b3..5eea011e5 100644 --- a/backend/server.go +++ b/backend/server.go @@ -119,13 +119,10 @@ func registerRoutes(engine *gin.Engine, m *modules, cfg *config) { enterprise := middleware.RequireEnterprise(func() bool { return m.billing.License().Current().IsEnterprise() }) - mssp := middleware.RequireMSSP(func() bool { - return m.billing.License().Current().IsMSSP() - }) iam.RegisterRoutes(api, m.iam, userAuth, enterprise) audit.RegisterRoutes(api, m.audit, userAuth) - appconfig.RegisterRoutes(api, m.appconfig, userAuth, mssp) + appconfig.RegisterRoutes(api, m.appconfig, userAuth, enterprise) billing.RegisterRoutes(api, m.billing, userAuth) alerts.RegisterRoutes(api, m.alerts, userAuth) soar.RegisterRoutes(api, m.soar, userAuth, apiKeyAuth) diff --git a/frontend/src/features/branding/pages/BrandingPage.tsx b/frontend/src/features/branding/pages/BrandingPage.tsx index c41c5b4c3..261b2ff13 100644 --- a/frontend/src/features/branding/pages/BrandingPage.tsx +++ b/frontend/src/features/branding/pages/BrandingPage.tsx @@ -29,7 +29,7 @@ export function BrandingPage() { const { t } = useTranslation() const { license } = useBilling() const { refresh: refreshGlobal } = useBranding() - const entitled = !!license?.mssp + const entitled = license?.edition === 'enterprise' const [form, setForm] = useState(EMPTY) const [initial, setInitial] = useState(EMPTY) @@ -105,7 +105,7 @@ export function BrandingPage() {
- {t('branding.msspRequired')}{' '} + {t('branding.enterpriseRequired')}{' '} {t('branding.manageLicense')} diff --git a/frontend/src/shared/i18n/locales/de.json b/frontend/src/shared/i18n/locales/de.json index ec84420d1..4caa257a4 100644 --- a/frontend/src/shared/i18n/locales/de.json +++ b/frontend/src/shared/i18n/locales/de.json @@ -1347,7 +1347,7 @@ "branding": { "title": "Branding", "subtitle": "Versehen Sie UTMStack mit der Identität Ihrer Organisation — überall angewendet: Login-Bildschirm, Seitenleiste, E-Mails und Berichte.", - "msspRequired": "White-Labeling ist eine MSSP-Funktion.", + "enterpriseRequired": "White-Labeling ist eine Enterprise-Funktion.", "manageLicense": "Lizenz verwalten", "enable": { "title": "White-Label", diff --git a/frontend/src/shared/i18n/locales/en.json b/frontend/src/shared/i18n/locales/en.json index 1d9a31811..439cf01bc 100644 --- a/frontend/src/shared/i18n/locales/en.json +++ b/frontend/src/shared/i18n/locales/en.json @@ -1499,7 +1499,7 @@ "branding": { "title": "Branding", "subtitle": "White-label UTMStack with your organization’s identity — applied everywhere: the login screen, sidebar, emails and reports.", - "msspRequired": "White-labeling is an MSSP feature.", + "enterpriseRequired": "White-labeling is an Enterprise feature.", "manageLicense": "Manage license", "enable": { "title": "White-label", diff --git a/frontend/src/shared/i18n/locales/es.json b/frontend/src/shared/i18n/locales/es.json index 86c4c1658..81e057463 100644 --- a/frontend/src/shared/i18n/locales/es.json +++ b/frontend/src/shared/i18n/locales/es.json @@ -1347,7 +1347,7 @@ "branding": { "title": "Marca", "subtitle": "Personaliza UTMStack con la identidad de tu organización — se aplica en todo: la pantalla de login, el menú lateral, los correos y los informes.", - "msspRequired": "El white-label es una función MSSP.", + "enterpriseRequired": "El white-label es una función Enterprise.", "manageLicense": "Gestionar licencia", "enable": { "title": "White-label", diff --git a/frontend/src/shared/i18n/locales/fr.json b/frontend/src/shared/i18n/locales/fr.json index d1d1017ea..d5d926982 100644 --- a/frontend/src/shared/i18n/locales/fr.json +++ b/frontend/src/shared/i18n/locales/fr.json @@ -1347,7 +1347,7 @@ "branding": { "title": "Marque", "subtitle": "Personnalisez UTMStack avec l’identité de votre organisation — appliquée partout : écran de connexion, barre latérale, e-mails et rapports.", - "msspRequired": "Le white-label est une fonctionnalité MSSP.", + "enterpriseRequired": "Le white-label est une fonctionnalité Enterprise.", "manageLicense": "Gérer la licence", "enable": { "title": "White-label", diff --git a/frontend/src/shared/i18n/locales/it.json b/frontend/src/shared/i18n/locales/it.json index abbb7ef9c..5318980f4 100644 --- a/frontend/src/shared/i18n/locales/it.json +++ b/frontend/src/shared/i18n/locales/it.json @@ -1347,7 +1347,7 @@ "branding": { "title": "Brand", "subtitle": "Personalizza UTMStack con l’identità della tua organizzazione — applicata ovunque: schermata di accesso, barra laterale, email e report.", - "msspRequired": "Il white-label è una funzione MSSP.", + "enterpriseRequired": "Il white-label è una funzione Enterprise.", "manageLicense": "Gestisci licenza", "enable": { "title": "White-label", diff --git a/frontend/src/shared/i18n/locales/pt.json b/frontend/src/shared/i18n/locales/pt.json index 3dd4141a8..cee96782f 100644 --- a/frontend/src/shared/i18n/locales/pt.json +++ b/frontend/src/shared/i18n/locales/pt.json @@ -1347,7 +1347,7 @@ "branding": { "title": "Marca", "subtitle": "Personalize o UTMStack com a identidade da sua organização — aplicado em tudo: tela de login, menu lateral, e-mails e relatórios.", - "msspRequired": "O white-label é um recurso MSSP.", + "enterpriseRequired": "O white-label é um recurso Enterprise.", "manageLicense": "Gerenciar licença", "enable": { "title": "White-label", diff --git a/frontend/src/shared/i18n/locales/ru.json b/frontend/src/shared/i18n/locales/ru.json index 7a922aed1..b0e95ef59 100644 --- a/frontend/src/shared/i18n/locales/ru.json +++ b/frontend/src/shared/i18n/locales/ru.json @@ -4661,7 +4661,7 @@ "branding": { "title": "Брендинг", "subtitle": "Оформите UTMStack под фирменный стиль вашей организации — он применяется везде: на экране входа, в боковой панели, письмах и отчётах.", - "msspRequired": "Брендинг под вашим именем — функция MSSP.", + "enterpriseRequired": "Брендинг под вашим именем — функция Enterprise.", "manageLicense": "Управление лицензией", "enable": { "title": "Брендинг под вашим именем",