remove self hosted expansion flag in favor of grouping hosted expansion with hosted purhcase and it's flag.
Этот коммит содержится в:
@@ -170,7 +170,6 @@ const defaultServerConfig: AdminConfig = {
|
||||
EnableCustomGroups: true,
|
||||
SelfHostedPurchase: true,
|
||||
AllowSyncedDrafts: true,
|
||||
SelfHostedExpansion: false,
|
||||
},
|
||||
TeamSettings: {
|
||||
SiteName: 'Mattermost',
|
||||
|
||||
@@ -390,7 +390,6 @@ type ServiceSettings struct {
|
||||
EnableCustomGroups *bool `access:"site_users_and_teams"`
|
||||
SelfHostedPurchase *bool `access:"write_restrictable,cloud_restrictable"`
|
||||
AllowSyncedDrafts *bool `access:"site_posts"`
|
||||
SelfHostedExpansion *bool `access:"write_restrictable,cloud_restrictable"`
|
||||
}
|
||||
|
||||
func (s *ServiceSettings) SetDefaults(isUpdate bool) {
|
||||
@@ -863,10 +862,6 @@ func (s *ServiceSettings) SetDefaults(isUpdate bool) {
|
||||
if s.SelfHostedPurchase == nil {
|
||||
s.SelfHostedPurchase = NewBool(true)
|
||||
}
|
||||
|
||||
if s.SelfHostedExpansion == nil {
|
||||
s.SelfHostedExpansion = NewBool(false)
|
||||
}
|
||||
}
|
||||
|
||||
type ClusterSettings struct {
|
||||
|
||||
@@ -476,7 +476,6 @@ func (ts *TelemetryService) trackConfig() {
|
||||
"post_priority": *cfg.ServiceSettings.PostPriority,
|
||||
"self_hosted_purchase": *cfg.ServiceSettings.SelfHostedPurchase,
|
||||
"allow_synced_drafts": *cfg.ServiceSettings.AllowSyncedDrafts,
|
||||
"self_hosted_expansion": *cfg.ServiceSettings.SelfHostedExpansion,
|
||||
})
|
||||
|
||||
ts.SendTelemetry(TrackConfigTeam, map[string]any{
|
||||
|
||||
@@ -69,7 +69,7 @@ describe('components/admin_console/license_settings/enterprise_edition/enterpris
|
||||
admin: {
|
||||
config: {
|
||||
ServiceSettings: {
|
||||
SelfHostedExpansion: true,
|
||||
SelfHostedPurchase: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -59,13 +59,13 @@ const EnterpriseEditionLeftPanel = ({
|
||||
const canExpand = useCanSelfHostedExpand();
|
||||
const selfHostedExpansionModal = useControlSelfHostedExpansionModal({trackingLocation: 'license_settings_add_seats'});
|
||||
const expandableLink = useSelector(getExpandSeatsLink);
|
||||
const isSelfHostedExpansionEnabled = useSelector(getConfig)?.ServiceSettings?.SelfHostedExpansion;
|
||||
const isSelfHostedPurchaseEnabled = useSelector(getConfig)?.ServiceSettings?.SelfHostedPurchase;
|
||||
|
||||
const query = useQuery();
|
||||
const actionQueryParam = query.get('action');
|
||||
|
||||
useEffect(() => {
|
||||
if (actionQueryParam === 'show_expansion_modal' && canExpand && isSelfHostedExpansionEnabled) {
|
||||
if (actionQueryParam === 'show_expansion_modal' && canExpand && isSelfHostedPurchaseEnabled) {
|
||||
selfHostedExpansionModal.open();
|
||||
query.set('action', '');
|
||||
}
|
||||
@@ -100,7 +100,7 @@ const EnterpriseEditionLeftPanel = ({
|
||||
);
|
||||
|
||||
const handleClickAddSeats = () => {
|
||||
if (!isSelfHostedExpansionEnabled || !canExpand) {
|
||||
if (!isSelfHostedPurchaseEnabled || !canExpand) {
|
||||
window.open(expandableLink(unsanitizedLicense.Id), '_blank');
|
||||
} else {
|
||||
selfHostedExpansionModal.open();
|
||||
|
||||
@@ -369,7 +369,6 @@ export type ServiceSettings = {
|
||||
EnableCustomGroups: boolean;
|
||||
SelfHostedPurchase: boolean;
|
||||
AllowSyncedDrafts: boolean;
|
||||
SelfHostedExpansion: boolean;
|
||||
};
|
||||
|
||||
export type TeamSettings = {
|
||||
|
||||
Ссылка в новой задаче
Block a user