Skip to content

Commit 2de76f4

Browse files
authored
Delete PORTAL_FEATURES_SHOW_CUSTOM_SMS_GATEWAY and PROJECT_WIZARD_IMPLEMENTATION #5213
ref DEV-2749 ref DEV-2750
2 parents f2c3447 + a7f8c51 commit 2de76f4

21 files changed

Lines changed: 45 additions & 1171 deletions

.env.example

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ OSANO_SCRIPT_SRC=
8484

8585
SAML_IDP_ENTITY_ID_TEMPLATE=urn:{{.app_id}}.localhost
8686

87-
# Portal feature flags
88-
PORTAL_FEATURES_SHOW_CUSTOM_SMS_GATEWAY=true
89-
9087
# Images server configs, uncomment accordingly depending on storage type
9188

9289
#IMAGES_OBJECT_STORE_TYPE=AWS_S3

once/bashrc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,3 @@ export ALLOWED_FRAME_ANCESTORS="$AUTHGEAR_HTTP_ORIGIN_PORTAL"
4848
export SEARCH_ENABLED='true'
4949
export AUDIT_LOG_ENABLED='true'
5050
export ANALYTIC_ENABLED='true'
51-
export PORTAL_FEATURES_SHOW_CUSTOM_SMS_GATEWAY='true'
52-
53-
export PROJECT_WIZARD_IMPLEMENTATION='v2'

pkg/lib/config/environment.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ type GlobalUIImplementation UIImplementation
2828

2929
type GlobalUISettingsImplementation SettingsUIImplementation
3030

31-
type ProjectWizardImplementaion string
32-
3331
type GlobalWhatsappAPIType WhatsappAPIType
3432

3533
type SharedAuthgearEndpoint string
@@ -112,7 +110,7 @@ type EnvironmentConfig struct {
112110

113111
UISettingsImplementation GlobalUISettingsImplementation `envconfig:"UI_SETTINGS_IMPLEMENTATION"`
114112

115-
ProjectWizardImplementation ProjectWizardImplementaion `envconfig:"PROJECT_WIZARD_IMPLEMENTATION"`
113+
// PROJECT_WIZARD_IMPLEMENTATION was deprecated.
116114

117115
WhatsappAPIType GlobalWhatsappAPIType `envconfig:"WHATSAPP_API_TYPE"`
118116

@@ -122,8 +120,3 @@ type EnvironmentConfig struct {
122120

123121
SharedAuthgearEndpoint SharedAuthgearEndpoint `envconfig:"SHARED_AUTHGEAR_ENDPOINT"`
124122
}
125-
126-
const (
127-
ProjectWizardImplementaionV1 ProjectWizardImplementaion = "v1"
128-
ProjectWizardImplementaionV2 ProjectWizardImplementaion = "v2"
129-
)

pkg/lib/deps/deps_provider.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ var EnvConfigDeps = wire.NewSet(
4343
"AppHostSuffixes",
4444
"UIImplementation",
4545
"UISettingsImplementation",
46-
"ProjectWizardImplementation",
4746
"WhatsappAPIType",
4847
"UserExportObjectStore",
4948
"SMSGatewayConfig",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package config
22

33
type PortalFeaturesConfig struct {
4-
ShowCustomSMSGateway bool `envconfig:"SHOW_CUSTOM_SMS_GATEWAY" default:"false"`
4+
// PORTAL_FEATURES_SHOW_CUSTOM_SMS_GATEWAY=true was deprecated.
55
}

pkg/portal/deps/deps.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ var DependencySet = wire.NewSet(
8282
"AppHostSuffixes",
8383
"UIImplementation",
8484
"UISettingsImplementation",
85-
"ProjectWizardImplementation",
8685
"SAML",
8786
),
8887
wire.FieldsOf(new(*RequestProvider),

pkg/portal/model/system_config.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,4 @@ type SystemConfig struct {
2727
GTMContainerID string `json:"gtmContainerID,omitempty"`
2828
UIImplementation string `json:"uiImplementation,omitempty"`
2929
UISettingsImplementation string `json:"uiSettingsImplementation,omitempty"`
30-
ProjectWizardImplementation string `json:"projectWizardImplementation,omitempty"`
31-
ShowCustomSMSGateway bool `json:"showCustomSMSGateway,omitempty"`
3230
}

pkg/portal/service/system_config.go

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,17 @@ type ResourceManager interface {
2121
}
2222

2323
type SystemConfigProvider struct {
24-
AuthgearConfig *config.AuthgearConfig
25-
AppConfig *config.AppConfig
26-
SearchConfig *config.SearchConfig
27-
AuditLogConfig *config.AuditLogConfig
28-
AnalyticConfig *configlib.AnalyticConfig
29-
GTMConfig *config.GoogleTagManagerConfig
30-
FrontendSentryConfig *config.PortalFrontendSentryConfig
31-
PortalFeaturesConfig *config.PortalFeaturesConfig
32-
GlobalUIImplementation configlib.GlobalUIImplementation
33-
GlobalUISettingsImplementation configlib.GlobalUISettingsImplementation
34-
GlobalProjectWizardImplementaion configlib.ProjectWizardImplementaion
35-
Resources ResourceManager
24+
AuthgearConfig *config.AuthgearConfig
25+
AppConfig *config.AppConfig
26+
SearchConfig *config.SearchConfig
27+
AuditLogConfig *config.AuditLogConfig
28+
AnalyticConfig *configlib.AnalyticConfig
29+
GTMConfig *config.GoogleTagManagerConfig
30+
FrontendSentryConfig *config.PortalFrontendSentryConfig
31+
PortalFeaturesConfig *config.PortalFeaturesConfig
32+
GlobalUIImplementation configlib.GlobalUIImplementation
33+
GlobalUISettingsImplementation configlib.GlobalUISettingsImplementation
34+
Resources ResourceManager
3635
}
3736

3837
func (p *SystemConfigProvider) SystemConfig(ctx context.Context) (*model.SystemConfig, error) {
@@ -74,8 +73,6 @@ func (p *SystemConfigProvider) SystemConfig(ctx context.Context) (*model.SystemC
7473
GTMContainerID: p.GTMConfig.ContainerID,
7574
UIImplementation: string(p.GlobalUIImplementation),
7675
UISettingsImplementation: string(p.GlobalUISettingsImplementation),
77-
ProjectWizardImplementation: string(p.GlobalProjectWizardImplementaion),
78-
ShowCustomSMSGateway: p.PortalFeaturesConfig.ShowCustomSMSGateway,
7976
}, nil
8077
}
8178

pkg/portal/wire_gen.go

Lines changed: 11 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

portal/src/AppRoot.tsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ const EditConfigurationScreen = lazy(
194194
const AppRoot: React.VFC = function AppRoot() {
195195
const { appID } = useParams() as { appID: string };
196196
const { setDisplayUnauthenticatedDialog } = useUnauthenticatedDialogContext();
197-
const { showCustomSMSGateway, isAuthgearOnce } = useSystemConfig();
197+
const { isAuthgearOnce } = useSystemConfig();
198198
const portalClient = usePortalClient();
199199
const client = useMemo(() => {
200200
const onLogout = () => {
@@ -846,16 +846,14 @@ const AppRoot: React.VFC = function AppRoot() {
846846
</Suspense>
847847
}
848848
/>
849-
{showCustomSMSGateway ? (
850-
<Route
851-
path="sms-gateway"
852-
element={
853-
<Suspense fallback={<ShowLoading />}>
854-
<SMSProviderConfigurationScreen />
855-
</Suspense>
856-
}
857-
/>
858-
) : null}
849+
<Route
850+
path="sms-gateway"
851+
element={
852+
<Suspense fallback={<ShowLoading />}>
853+
<SMSProviderConfigurationScreen />
854+
</Suspense>
855+
}
856+
/>
859857
<Route
860858
path="endpoint-direct-access"
861859
element={

0 commit comments

Comments
 (0)