mattermost: add patches for user limit and banner removal

This commit is contained in:
jose
2026-05-22 13:53:15 +08:00
committed by Morgan Jones
parent bae78f0861
commit fc9f1c91b2
4 changed files with 121 additions and 1 deletions

View File

@@ -58,11 +58,20 @@ import ../make-test-python.nix (
UserNoticesEnabled = false;
};
};
package = pkgs.mattermost.override {
removeFreeBadge = true;
removeUserLimit = true;
};
} mattermostConfig;
# Upgrade to the latest Mattermost.
specialisation.latest.configuration = {
services.mattermost.package = lib.mkForce pkgs.mattermostLatest;
services.mattermost.package = lib.mkForce (
pkgs.mattermostLatest.override {
removeFreeBadge = true;
removeUserLimit = true;
}
);
system.stateVersion = lib.mkVMOverride (lib.versions.majorMinor lib.version);
};
}

View File

@@ -0,0 +1,85 @@
diff --git a/webapp/channels/src/components/global_header/left_controls/product_menu/product_branding_team_edition/product_branding_free_edition.tsx b/webapp/channels/src/components/global_header/left_controls/product_menu/product_branding_team_edition/product_branding_free_edition.tsx
index 93cb8ab263..3d12cd5e54 100644
--- a/webapp/channels/src/components/global_header/left_controls/product_menu/product_branding_team_edition/product_branding_free_edition.tsx
+++ b/webapp/channels/src/components/global_header/left_controls/product_menu/product_branding_team_edition/product_branding_free_edition.tsx
@@ -57,7 +57,6 @@ const ProductBrandingFreeEdition = (): JSX.Element => {
width={116}
height={20}
/>
- <Badge>{badgeText}</Badge>
</ProductBrandingFreeEditionContainer>
);
};
diff --git a/webapp/channels/src/components/header_footer_route/header.scss b/webapp/channels/src/components/header_footer_route/header.scss
index c2e6fbd187..bc1cedcff1 100644
--- a/webapp/channels/src/components/header_footer_route/header.scss
+++ b/webapp/channels/src/components/header_footer_route/header.scss
@@ -47,20 +47,7 @@
}
.freeBadge {
- position: relative;
- top: 1px;
- display: flex;
- align-self: center;
- padding: 2px 6px;
- border-radius: var(--radius-s);
- margin-left: 12px;
- background: rgba(var(--center-channel-color-rgb), 0.08);
- color: rgba(var(--center-channel-color-rgb), 0.75);
- font-family: 'Open Sans', sans-serif;
- font-size: 10px;
- font-weight: 600;
- letter-spacing: 0.025em;
- line-height: 16px;
+ display: none !important;
}
}
}
@@ -83,12 +70,6 @@
margin-top: 12px;
}
}
-
- &.has-free-banner.has-custom-site-name {
- .header-back-button {
- bottom: -20px;
- }
- }
}
@media screen and (max-width: 699px) {
diff --git a/webapp/channels/src/components/widgets/menu/menu_items/menu_item.scss b/webapp/channels/src/components/widgets/menu/menu_items/menu_item.scss
index dee9b57f8c..8ef4aa073a 100644
--- a/webapp/channels/src/components/widgets/menu/menu_items/menu_item.scss
+++ b/webapp/channels/src/components/widgets/menu/menu_items/menu_item.scss
@@ -316,14 +316,7 @@
}
.MenuStartTrial {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- padding: 8px 20px;
- border-radius: 4px;
- margin-top: 0;
- font-size: 12px;
- line-height: 16px;
+ display: none !important;
button {
padding: 3px 0;
diff --git a/webapp/channels/webpack.config.js b/webapp/channels/webpack.config.js
index f29f19f9ab..ab85fc3b86 100644
--- a/webapp/channels/webpack.config.js
+++ b/webapp/channels/webpack.config.js
@@ -469,6 +469,9 @@ if (targetIsDevServer) {
historyApiFallback: {
index: '/static/root.html',
},
+ client: {
+ overlay: false,
+ },
},
performance: false,
optimization: {

View File

@@ -0,0 +1,16 @@
diff --git a/server/channels/app/limits.go b/server/channels/app/limits.go
index 4c88c1f049..3c1af8d02f 100644
--- a/server/channels/app/limits.go
+++ b/server/channels/app/limits.go
@@ -10,8 +10,8 @@ import (
)
const (
- maxUsersLimit = 200
- maxUsersHardLimit = 250
+ maxUsersLimit = 10000000
+ maxUsersHardLimit = 10000000
)
func (a *App) GetServerLimits() (*model.ServerLimits, *model.AppError) {

View File

@@ -13,6 +13,8 @@
nixosTests,
latestVersionInfo ? null,
removeUserLimit ? false,
removeFreeBadge ? false,
versionInfo ? {
# ESR releases only. Note: if NixOS would release with an ESR that goes out
# of support during the lifetime of the NixOS release, it is acceptable
@@ -136,6 +138,14 @@ buildMattermost rec {
'';
};
patches =
lib.optionals removeFreeBadge [
./mattermost-remove-free-banner.patch
]
++ lib.optionals removeUserLimit [
./mattermost-remove-user-limit.patch
];
# Needed because buildGoModule does not support go workspaces yet.
# We use go 1.22's workspace vendor command, which is not yet available
# in the default version of go used in nixpkgs, nor is it used by upstream: