Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backend/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
6 changes: 3 additions & 3 deletions backend/modules/appconfig/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
}
2 changes: 1 addition & 1 deletion backend/modules/appconfig/usecase/branding.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
5 changes: 1 addition & 4 deletions backend/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/features/branding/pages/BrandingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<Branding>(EMPTY)
const [initial, setInitial] = useState<Branding>(EMPTY)
Expand Down Expand Up @@ -105,7 +105,7 @@ export function BrandingPage() {
<div className="mt-5 flex items-start gap-3 rounded-xl border border-amber-500/30 bg-amber-500/5 px-4 py-3 text-sm">
<Crown size={16} className="mt-0.5 shrink-0 text-amber-500" />
<div className="flex-1">
<span className="text-foreground">{t('branding.msspRequired')}</span>{' '}
<span className="text-foreground">{t('branding.enterpriseRequired')}</span>{' '}
<Link to="/settings/license" className="font-medium text-primary hover:underline">
{t('branding.manageLicense')}
</Link>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/shared/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/shared/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/shared/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/shared/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/shared/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/shared/i18n/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/shared/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -4661,7 +4661,7 @@
"branding": {
"title": "Брендинг",
"subtitle": "Оформите UTMStack под фирменный стиль вашей организации — он применяется везде: на экране входа, в боковой панели, письмах и отчётах.",
"msspRequired": "Брендинг под вашим именем — функция MSSP.",
"enterpriseRequired": "Брендинг под вашим именем — функция Enterprise.",
"manageLicense": "Управление лицензией",
"enable": {
"title": "Брендинг под вашим именем",
Expand Down
Loading