fix: nango watermark can't be turned off in self hosted #5042
+28
−5
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.
Describe
#4750 didn't surface watermark disabling and enabling in frontend, where it was previously just checking if user has a plan. Now, frontend has similar checks with backend https://github.com/NangoHQ/nango/blob/master/packages/shared/lib/services/connect-ui-settings.service.ts#L94-L100 when it comes to enabling / disabling Nango watermark in settings.
Issue
Fixes #4915
Testing
Screen.Recording.2025-11-19.at.7.04.09.PM.mov
Expose hosting flags & unify watermark-disable logic
Adds
isHostedandisEnterpriseflags to the env JS payload and propagates them through shared types. Front-end settings page now mirrors the back-end rule for deciding whether the Connect UI watermark can be disabled, fixing the inability to remove the watermark in self-hosted deployments. Tooltip copy is updated to provide context-specific guidance.Key Changes
• Updated
packages/server/lib/controllers/v1/getEnvJs.tsto appendisHostedandisEnterprisetowindow._envand include them in thefeaturesobject returned to the browser• Extended
WindowEnvinterface inpackages/types/lib/web/env.tswithisHostedandisEnterprisebooleans• Refactored
packages/webapp/src/pages/Environment/Settings/ConnectUISettings/index.tsxto computecanDisableWatermarkusingglobalEnvflags and environment plan; switchdisabledstate and tooltip message now conditional on the new logicAffected Areas
•
getEnvJscontroller (env JS generation)•
WindowEnvshared type• Connect UI settings React component
This summary was automatically generated by @propel-code-bot