remove self hosted expansion flag in favor of grouping hosted expansion with hosted purhcase and it's flag.

Этот коммит содержится в:
Conor Macpherson
2023-04-17 16:11:43 -04:00
родитель 2cd40d6560
Коммит f613c655e7
6 изменённых файлов: 4 добавлений и 12 удалений

Просмотреть файл

@@ -170,7 +170,6 @@ const defaultServerConfig: AdminConfig = {
EnableCustomGroups: true, EnableCustomGroups: true,
SelfHostedPurchase: true, SelfHostedPurchase: true,
AllowSyncedDrafts: true, AllowSyncedDrafts: true,
SelfHostedExpansion: false,
}, },
TeamSettings: { TeamSettings: {
SiteName: 'Mattermost', SiteName: 'Mattermost',

Просмотреть файл

@@ -390,7 +390,6 @@ type ServiceSettings struct {
EnableCustomGroups *bool `access:"site_users_and_teams"` EnableCustomGroups *bool `access:"site_users_and_teams"`
SelfHostedPurchase *bool `access:"write_restrictable,cloud_restrictable"` SelfHostedPurchase *bool `access:"write_restrictable,cloud_restrictable"`
AllowSyncedDrafts *bool `access:"site_posts"` AllowSyncedDrafts *bool `access:"site_posts"`
SelfHostedExpansion *bool `access:"write_restrictable,cloud_restrictable"`
} }
func (s *ServiceSettings) SetDefaults(isUpdate bool) { func (s *ServiceSettings) SetDefaults(isUpdate bool) {
@@ -863,10 +862,6 @@ func (s *ServiceSettings) SetDefaults(isUpdate bool) {
if s.SelfHostedPurchase == nil { if s.SelfHostedPurchase == nil {
s.SelfHostedPurchase = NewBool(true) s.SelfHostedPurchase = NewBool(true)
} }
if s.SelfHostedExpansion == nil {
s.SelfHostedExpansion = NewBool(false)
}
} }
type ClusterSettings struct { type ClusterSettings struct {

Просмотреть файл

@@ -476,7 +476,6 @@ func (ts *TelemetryService) trackConfig() {
"post_priority": *cfg.ServiceSettings.PostPriority, "post_priority": *cfg.ServiceSettings.PostPriority,
"self_hosted_purchase": *cfg.ServiceSettings.SelfHostedPurchase, "self_hosted_purchase": *cfg.ServiceSettings.SelfHostedPurchase,
"allow_synced_drafts": *cfg.ServiceSettings.AllowSyncedDrafts, "allow_synced_drafts": *cfg.ServiceSettings.AllowSyncedDrafts,
"self_hosted_expansion": *cfg.ServiceSettings.SelfHostedExpansion,
}) })
ts.SendTelemetry(TrackConfigTeam, map[string]any{ ts.SendTelemetry(TrackConfigTeam, map[string]any{

Просмотреть файл

@@ -69,7 +69,7 @@ describe('components/admin_console/license_settings/enterprise_edition/enterpris
admin: { admin: {
config: { config: {
ServiceSettings: { ServiceSettings: {
SelfHostedExpansion: true, SelfHostedPurchase: true,
}, },
}, },
}, },

Просмотреть файл

@@ -59,13 +59,13 @@ const EnterpriseEditionLeftPanel = ({
const canExpand = useCanSelfHostedExpand(); const canExpand = useCanSelfHostedExpand();
const selfHostedExpansionModal = useControlSelfHostedExpansionModal({trackingLocation: 'license_settings_add_seats'}); const selfHostedExpansionModal = useControlSelfHostedExpansionModal({trackingLocation: 'license_settings_add_seats'});
const expandableLink = useSelector(getExpandSeatsLink); const expandableLink = useSelector(getExpandSeatsLink);
const isSelfHostedExpansionEnabled = useSelector(getConfig)?.ServiceSettings?.SelfHostedExpansion; const isSelfHostedPurchaseEnabled = useSelector(getConfig)?.ServiceSettings?.SelfHostedPurchase;
const query = useQuery(); const query = useQuery();
const actionQueryParam = query.get('action'); const actionQueryParam = query.get('action');
useEffect(() => { useEffect(() => {
if (actionQueryParam === 'show_expansion_modal' && canExpand && isSelfHostedExpansionEnabled) { if (actionQueryParam === 'show_expansion_modal' && canExpand && isSelfHostedPurchaseEnabled) {
selfHostedExpansionModal.open(); selfHostedExpansionModal.open();
query.set('action', ''); query.set('action', '');
} }
@@ -100,7 +100,7 @@ const EnterpriseEditionLeftPanel = ({
); );
const handleClickAddSeats = () => { const handleClickAddSeats = () => {
if (!isSelfHostedExpansionEnabled || !canExpand) { if (!isSelfHostedPurchaseEnabled || !canExpand) {
window.open(expandableLink(unsanitizedLicense.Id), '_blank'); window.open(expandableLink(unsanitizedLicense.Id), '_blank');
} else { } else {
selfHostedExpansionModal.open(); selfHostedExpansionModal.open();

Просмотреть файл

@@ -369,7 +369,6 @@ export type ServiceSettings = {
EnableCustomGroups: boolean; EnableCustomGroups: boolean;
SelfHostedPurchase: boolean; SelfHostedPurchase: boolean;
AllowSyncedDrafts: boolean; AllowSyncedDrafts: boolean;
SelfHostedExpansion: boolean;
}; };
export type TeamSettings = { export type TeamSettings = {