[pull] master from mattermost:master - #895
Merged
Merged
Conversation
…ings are not recommended for production (#37407) * [MM-69737] Add production warning callouts to System Console settings Add a reactive red danger SectionNotice under System Console settings when they are configured to a value not recommended for production. Introduces an optional production_warning descriptor on the admin schema pipeline (and the LDAP wizard pipeline) that renders between the control and the help text. Co-authored-by: mattermost-code <matty-code@mattermost.com> * [MM-69737] Add tests for production warning callout rendering Cover the schema pipeline rendering path: danger SectionNotice shows for the insecure value, is absent for the recommended value, toggles reactively without saving, and works for a wildcard text setting. Co-authored-by: mattermost-code <matty-code@mattermost.com> * [MM-69737] Suppress production warning for disabled settings; expand tests Do not render the danger callout when the setting control is disabled (e.g. SAML Verify while SAML sign-in is off), so the warning only appears for active, editable settings. Add coverage for the disabled case, the warns-on-false predicate, and the LDAP wizard render pipeline. Co-authored-by: mattermost-code <matty-code@mattermost.com> * [MM-69737] Address CodeRabbit nitpicks for production warning Reuse isDisabled in renderHelpTextWithWarning and document that production_warning is wired for bool/text settings only. Co-authored-by: mattermost-code <matty-code@mattermost.com> * [MM-69737] Fix eslint lines-around-comment on production_warning doc Co-authored-by: mattermost-code <matty-code@mattermost.com> * Fix SectionNotice title margin in admin console Remove unwanted bottom margin on SectionNotice h4 titles caused by admin console's general h4 styling rule. Co-authored-by: Matthew Birtch <mattbirtch@gmail.com> * Remove redundant banner warning and scope SectionNotice title fix - Remove redundant top-level banner warning for testing commands on Developer Settings page, since inline production warnings now cover this functionality - Scope SectionNoticeTitle margin fix to only production warning callouts (.admin-console__production-warning) rather than all SectionNotice components in admin console Addresses feedback from @matthewbirtch and CodeRabbit review. Co-authored-by: Matthew Birtch <mattbirtch@gmail.com> * Remove unused i18n string admin.service.testingWarning The banner using this string was removed in favor of inline production warnings, so the i18n string is no longer needed. Co-authored-by: Joram Wilander <joram@mattermost.com> * Remove obsolete test for deleted warning banner The test was checking for a warning banner before the EnableTesting setting, but that banner was removed in favor of inline production warnings. The remaining test (checking help text guidance) still passes and provides the necessary validation. Co-authored-by: Joram Wilander <joram@mattermost.com> * Address PR feedback: copy changes to production warning text --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: mattermost-code <matty-code@mattermost.com> Co-authored-by: Matthew Birtch <mattbirtch@gmail.com> Co-authored-by: Joram Wilander <joram@mattermost.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
) * Return error when inviting deactivated users to team When a user account is deactivated, attempts to invite them to a team via email should return an error rather than attempting to send the invitation email. Added deactivated user checks in: - InviteNewUsersToTeamGracefully - InviteNewUsersToTeam - InviteGuestsToChannelsGracefully - InviteGuestsToChannels - localInviteUsersToTeam (mmctl path) For each invite email, the code now calls GetUserByEmail and checks whether the returned user has DeleteAt != 0 (deactivated). If so, the invite is rejected with api.team.invite_members.account_deactivated.app_error. Fixes MM-57390 Co-authored-by: mattermost-code <matty-code@mattermost.com> * Add missing deactivated-user invite tests for CI coverage Add tests for InviteGuestsToChannels (non-graceful) and localInviteUsersToTeam (graceful and non-graceful) to satisfy PR test analysis requirements. Co-authored-by: mattermost-code <matty-code@mattermost.com> * Handle GetUserByEmail errors in deactivated-user invite checks Add IsDeactivatedUserEmail helper that distinguishes user-not-found from lookup failures, and use it across invite paths to avoid silently proceeding when email lookups fail. Co-authored-by: mattermost-code <matty-code@mattermost.com> * Extract checkForDeactivatedInvites helper to DRY up invite paths * Tighten checkForDeactivatedInvites doc comment * Fix govet err shadow in InviteGuestsToChannels Reuse the existing err from prepareInviteGuestsToChannels instead of redeclaring it when calling checkForDeactivatedInvites, which was failing check-style (govet shadow). Apply the same pattern in InviteNewUsersToTeam for consistency. Co-authored-by: mattermost-code <matty-code@mattermost.com> * chore: retrigger CI and CodeRabbit review Co-authored-by: mattermost-code <matty-code@mattermost.com> * Reuse CheckForDeactivatedInvites in local invite path Export the helper and replace the duplicated non-graceful deactivated email loop in localInviteUsersToTeam so it shares the same logic as InviteNewUsersToTeam and InviteGuestsToChannels. Co-authored-by: mattermost-code <matty-code@mattermost.com> * chore: retrigger CodeRabbit after quiet period Co-authored-by: mattermost-code <matty-code@mattermost.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: mattermost-code <matty-code@mattermost.com>
…keys (#37846) * [MM-70130] Add permanent banner for non-production developer license keys Co-authored-by: nick.misasi <nick.misasi@mattermost.com> * [MM-70130] Update non-production license banner text Co-authored-by: Nick Misasi <nick13misasi@gmail.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )