Граф коммитов

2167 Коммитов

Автор SHA1 Сообщение Дата
Sharuru
2a753a6d82 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (2693 of 2693 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/zh_Hans/
2025-06-02 17:43:53 +02:00
MArtin Johnson
d3f3a203e4 Translated using Weblate (Swedish)
Currently translated at 99.8% (2689 of 2693 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/sv/
2025-06-02 17:43:53 +02:00
MArtin Johnson
4c0d46e186 Translated using Weblate (Swedish)
Currently translated at 99.0% (2668 of 2693 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/sv/
2025-06-02 17:43:53 +02:00
jprusch
1ba1a54111 Translated using Weblate (German)
Currently translated at 100.0% (2693 of 2693 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/de/
2025-06-02 17:43:53 +02:00
Ibrahim Serdar Acikgoz
5c54c8fefe Enable Attribte Based Access Control FF by default (#31269) 2025-06-02 15:40:28 +02:00
Miguel de la Cruz
c6c27e7752 Adds a feature flag and the logic to hide plugin interactions on shared channels (#31185)
* Adds a feature flag and the logic to hide plugin interactions on shared channels

* Address review comments

* Fix CI

* Address review comments

* Address review comments

---------

Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-06-02 12:59:19 +00:00
Claudio Costa
d2292a13d2 Bump shared db pool size in store for parallel tests (#31262) 2025-06-02 09:59:21 +02:00
Eva Sarafianou
c90dfa4895 Move to library archives (#31100)
* Move to library archives

* wrap the error with %w

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>

* remove redundant format

---------

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2025-06-02 09:21:37 +03:00
Ibrahim Serdar Acikgoz
6f26ad5cec [ABAC - Table Editor] Improvements on table editor and review feedback (#31125)
* reflect review comments

* update table editor

* adjust test limits

* reflect review comments

* MM-64376

* resolve conflicts

* address review comments

* fix merge conflict error
2025-06-01 12:05:57 +02:00
Jesse Hallam
489ea1fdd6 Remove SELECT * from product notices store (#31246)
* Remove SELECT * from product notices store

Replace wildcard selects with explicit column names and use SelectBuilder pattern for consistency with other stores.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update server/channels/store/sqlstore/product_notices_store.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-31 14:53:42 +05:30
Jesse Hallam
86a2368fe0 avoid SELECT * in channel_store_categories.go (#31245) 2025-05-30 14:14:17 -05:00
Jesse Hallam
b7012952c4 MM-62158: Final migration for GetMemberUsersNotInChannel and GetMemberUsersInTeam (#31237)
* upgrade mattermost/squirrel

* migrate GetMemberUsersInTeam

* migrate GetMemberUsersNotInChannel
2025-05-30 16:20:05 +00:00
Jesse Hallam
e04f487cb8 adopt golangci-lint v2 (#31222)
* adopt golangci-lint v2

No actual linting changes in this commit, just upgraded tooling and
directives to ignore new linter rules. Adopting v2 solves some
gosec issues in v1 and also happens to be a nice performance boost!
As part of this PR, we also drop support for `MM_NO_ENTERPRISE_LINT`
which hasn't been need for a while anyway.

* simplify: go install is fine!

* missing GOBIN

* golangci-lint: drop legacy preset exclusion
2025-05-30 15:31:30 +00:00
David Krauser
761584c040 [MM-64244] Add websocket disconnect reason metric (#31032)
We've recently spent some effort improving websocket reconnection logic. With this commit, I've augmented the websocket reconnect metric to include a disconnect reason. This will help us measure the impact of these changes in production.
2025-05-30 08:15:20 -04:00
Claudio Costa
611b2a8e79 [MM-62408] Server Code Coverage with Fully Parallel Tests (#30078)
* TestPool

* Store infra

* Store tests updates

* Bump maximum concurrent postgres connections

* More infra

* channels/jobs

* channels/app

* channels/api4

* Protect i18n from concurrent access

* Replace some use of os.Setenv

* Remove debug

* Lint fixes

* Fix more linting

* Fix test

* Remove use of Setenv in drafts tests

* Fix flaky TestWebHubCloseConnOnDBFail

* Fix merge

* [MM-62408] Add CI job to generate test coverage (#30284)

* Add CI job to generate test coverage

* Remove use of Setenv in drafts tests

* Fix flaky TestWebHubCloseConnOnDBFail

* Fix more Setenv usage

* Fix more potential flakyness

* Remove parallelism from flaky test

* Remove conflicting env var

* Fix

* Disable parallelism

* Test atomic covermode

* Disable parallelism

* Enable parallelism

* Add upload coverage step

* Fix codecov.yml

* Add codecov.yml

* Remove redundant workspace field

* Add Parallel() util methods and refactor

* Fix formatting

* More formatting fixes

* Fix reporting
2025-05-30 13:58:26 +02:00
Ibrahim Serdar Acikgoz
1cf2f08108 [MM-64437] Hotfix on attribute view creation error (#31225) 2025-05-30 11:35:31 +02:00
Devin Binnie
e1c0c57d31 [MM-63933] Don't include channels from an archived team unless specified in GetChannelsForUser (#31163)
* [MM-63933] Don't include channels from an archived team unless specified in GetChannelsForUser

* PR feedback

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-05-29 13:35:38 +00:00
Daniel Espino García
293f38ad0b Ensure users status is set to offline when deactivated (#30900) 2025-05-29 10:41:14 +02:00
Agniva De Sarker
79bf1c34db MM-63217: Bump dependencies (#31021)
* MM-63217: Bump dependencies

Skip-Enterprise-PR: true

https://mattermost.atlassian.net/browse/MM-63217

```release-note
NONE
```

* fix go.mod

```release-note
NONE
```

* fix test

```release-note
NONE
```
2025-05-29 13:08:00 +05:30
Claudio Costa
d38c27f96f [MM-64402] Improve validation of imported attachments (#31201)
* Improve validation of imported attachments

* Simplify multiple errors handling

* Improve logic

* Fix abs paths in tests

* Remove redundant clean

* Implement additional validation

* Fix absolute paths in test

* Add additional tests

---------

Co-authored-by: Lorenzo Gallegos <1328683+enzowritescode@users.noreply.github.com>
2025-05-29 07:44:50 +02:00
Harrison Healey
07239a5217 MM-64316 Fix icon_emoji not working on webhook posts (#31068)
* MM-64316 Fix icon_emoji not working on webhook posts

* Add test case for custom emojis

* Remove unneeded test cleanup

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-05-28 22:54:06 +00:00
Jesse Hallam
7a61d498ea MM-64438: skip flaky: testGetNthRecentPostTime (#31223) 2025-05-28 17:47:43 -03:00
catalintomai
62bd9d917d MM-62745: [Shared Channels] Fix duplicate mentioning - local user with the same username as someone on the remote server (#30734)
* initial checkin

* i18n/en.json

* fix e2e test

* fix Makefile

* initial checkin

* fix logic

* fix spacing

* simplify

* further simplify

* address spec update

* remove removeMention

* simplify code

* simplify code(2)

* simplify code(3)

* simplify code(4)

* update comment

* simplify comments

* remove useless test

---------

Co-authored-by: Catalin Tomai <catalintomai@catalins-macbook-pro-2.home>
2025-05-27 13:18:41 +00:00
catalintomai
e6ed3436fb MM-54023: [Shared Channels] Filter out system posts for channel update info that is not synced (#30735)
* initial checkin

* simplify tests, logic

* fix tests

* remove unneeded test

* fix spacing

* updates

* update logic

* fix logic

* move filtering to DB

* remove comment

---------

Co-authored-by: Catalin Tomai <catalintomai@catalins-macbook-pro-2.home>
2025-05-27 13:15:49 +00:00
Miguel de la Cruz
fbf105f6ef Improves the invite mechanism for remote clusters (#31025)
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
2025-05-27 13:39:13 +02:00
Miguel de la Cruz
e51ea025db Deletes CPA values on CPA field type change (#31122)
* Deletes CPA values on CPA field type change

* Fix error method name reference

* Cleans the state when a CPA field's type is updated

* Fix types

* Fix linter

* Webapp no longer makes a decision on the change and server sents a flag in the WS message

* Fix linter

---------

Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
2025-05-27 13:38:05 +02:00
Miguel de la Cruz
b3649132d0 Sets the Custom Profile Attributes feature flag to true by default (#31160)
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
2025-05-27 13:35:02 +02:00
Agniva De Sarker
3d5cf06237 [AI assisted] MM-62927: add comprehensive whitespace validation tests for FileSettings paths (#31087)
https://mattermost.atlassian.net/browse/MM-62927

```release-note
NONE
```
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-05-27 10:03:12 +05:30
Jesse Hallam
70a42ffd5f Reject mysql for enterprise advanced (#31164)
* reject MySQL with the enterprise advanced license

If a user attempts to set an Enterprise Advanced License while
configured with MySQL, reject the license. This SKU is not compatible
with MYSQL.

* fix trial typo

* suppress trial banner if MySQL

* Update server/channels/app/platform/license_test.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix types

* suppress mysql from show start trial modal

* Skip MySQL-incompatible tests for access control and channel banner features

Skip the following tests when running with MySQL database:
- Access control policy tests (create, get, delete, check/test expressions, search, assign/unassign, get channels)
- Channel banner tests in TestPatchChannel and TestCanEditChannelBanner

These features are not supported on MySQL and the tests would fail.
Tests will continue to run normally on PostgreSQL.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Skip TestSearchChannelsForAccessControlPolicy subtest for MySQL

Add MySQL skip logic to the "SearchChannelsForAccessControlPolicy with regular user"
subtest as this access control feature is not supported on MySQL.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* reject trial license requests for MySQL

* return false on sku + mysql match, even if logger is nil

* Fix MySQL trial license tests to skip appropriately based on database driver

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-05-26 15:44:32 -03:00
ThrRip
a0492be56f Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (2688 of 2688 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/zh_Hans/
2025-05-26 20:38:25 +02:00
MArtin Johnson
f8d752f14b Translated using Weblate (Swedish)
Currently translated at 99.2% (2667 of 2688 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/sv/
2025-05-26 20:38:25 +02:00
Tom De Moor
e393ecacd7 Translated using Weblate (Dutch)
Currently translated at 99.7% (2681 of 2688 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/nl/
2025-05-26 20:38:25 +02:00
MArtin Johnson
b9a95d69b2 Translated using Weblate (Swedish)
Currently translated at 98.8% (2658 of 2688 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/sv/
2025-05-26 20:38:25 +02:00
MArtin Johnson
26f26fe66b Translated using Weblate (Swedish)
Currently translated at 98.8% (2657 of 2688 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/sv/
2025-05-26 20:38:25 +02:00
jprusch
b92f994d5a Translated using Weblate (German)
Currently translated at 100.0% (2688 of 2688 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/de/
2025-05-26 20:38:25 +02:00
Ben Cooke
bfe90c3704 New pluginapi method for syncables (#30790)
* new pluginapi method for syncables
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-05-21 14:44:34 -04:00
Jesse Hallam
31a8047973 Disable morph logging during TestMain (#30948)
* rm "No TEST_DATABASE... override" log message

Let's only log if this value is actually overridden.

* rm "(Created|Dropped) temporary database" message

* only log "Pinging SQL" on subsequent attempts

* disable morph logging from TestMain

* Fix style issues in store test files

- Add missing parameter to migrate() function calls in tests
- Remove unused log function in settings.go
- Fix formatting with go fmt

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* within sqlstore, use "enable" vs "disable" for clarity

* remove trailing newline from morph logs

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-05-21 17:31:18 +00:00
Jesse Hallam
92db356484 MM-62158: group store no select star, part3 (#30927)
* migrate getGroupsAssociatedToChannelsByTeam

* migrate GetGroups

* migrate teamMembersMinusGroupMembersQuery

* migrate channelMembersMinusGroupMembersQuery
2025-05-21 14:19:38 -03:00
Ben Schumacher
6de3379994 [MM-61099] Fix errcheck issues in server/channels/app/brand.go (#30679)
* [MM-28779] Fix errcheck issues in server/channels/app/brand.go

Remove brand.go from the errcheck exclusion list in .golangci.yml and fixed the error by properly handling the return value from a.MoveFile().

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [MM-28779] Add test to verify brand image backup functionality

Add a new test that verifies backup of the original brand image happens when a new one is uploaded. This helps to ensure the fix for errcheck issues is working as expected.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* use seperate temporary filestore for each test

* Use FileSettings.Directory instead of finding the dir programatically

* Fix another test

* Fix defer

* Update server/channels/api4/job_test.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix bad bot commit

* Cleanup logs message

* cleanup file path

* Fix error variable names

* WIP:cleanup panic ussage

* Revert "WIP:cleanup panic ussage"

This reverts commit c3284e4427a41c818acc161926cd2535dee9a6b9.

* cleanup error checks

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-05-21 16:35:00 +02:00
Claudio Costa
56c6d8a9ab Prepackage Calls v1.8.0 (#31124) 2025-05-21 09:21:39 +02:00
Agniva De Sarker
09ea32a03c MM-63300: Fix flaky test TestBusySet (#31116)
(*Busy).Set would set its own timer, and additionally
send a message across the cluster. In this case, the cluster
is mocked locally. But the timer calculation happens again.

We marshal the expiry time with b.expires.Unix() and send that
as part of model.ServerBusyState. This is parsed again in
ClusterEventChanged and converted to duration with time.Until.

Therefore, if it takes longer for the code to reach those lines,
then the new time calculated would have already expired, failing
the test.

To fix this, we increase the timeout. This slows down the test
at the cost of extra reliability. This is a common failure point
with any timer related tests.

Additionally, we also change the condition in compareBusyState
to check for less-than rather than strict equality.

https://mattermost.atlassian.net/browse/MM-63300

```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-05-21 08:48:46 +05:30
Agniva De Sarker
ad56ab3fdc MM-62365: Remove unused field from MetricSample (#30991)
The Timestamp field was not used at all. Therefore
removing it.

https://mattermost.atlassian.net/browse/MM-62365

```release-note
NONE
```
2025-05-21 08:43:00 +05:30
kshitij katiyar
14dfc71e10 Bump prepackage Jira plugin version to 4.3.0 (#31098)
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-05-20 18:26:29 -04:00
Harrison Healey
1bfd3a6a6e Slightly improve performance of sidebar update APIs (#31061) 2025-05-20 21:16:28 +00:00
Harrison Healey
b70f1d859d MM-63923/MM-63924/MM-63925 Prevent deadlocks and constraint errors in UpdateSidebarCategories (#30965)
* MM-63925 Remove most nested transactions from channel_store_categories.go

There's one place which still has a nested transaction in
CreateInitialSidebarCategories, but that's because it's calling out to a
different part of the store. The only way to avoid that would be to
break the extraction like UpdateSidebarCategories does to update
preferences, but I chose not to follow that pattern here and leave it
as-is.

* MM-63923 Prevent deadlocks caused by updating multiple categories in a different order

* MM-63923 Prevent deadlocks while deleting from SidebarChannels

This could also have been resolved by sorting the categories, but
combining the queries seems a bit more elegant.

* MM-63924 Ensure adding SidebarChannels rows is idempotent

* Add additional test to cause deadlocks

* Prevent channels from appearing in a single category multiple times

* Other review feedback
2025-05-20 16:02:32 -04:00
Jesse Hallam
fa40a8c5d4 MM-64226: improved post deduplication (#31004)
Require access to a post before allowing PendingPostId to deduplicate.

Fixes: https://mattermost.atlassian.net/browse/MM-64226
2025-05-20 10:05:10 -03:00
Harsh Aulakh
8e033f41d1 add config reload e2e tests (#29396)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2025-05-20 11:26:55 +02:00
Ben Schumacher
c2d08b7540 [MM-63772] Add LDAP setting to re-add removed members (#30787) 2025-05-20 11:15:25 +02:00
Caleb Roseland
5021fc72c6 Prepackage Playbooks 2.2.0 (#31067) 2025-05-19 16:42:22 -05:00
Jesse Hallam
65aec10162 MM-64336: simplify doc extractor (#31103)
* MM-64336: simplify doc extractor

Avoid creating a whole temporary directory when a single temporary file suffices.

Fixes: https://mattermost.atlassian.net/browse/MM-64337

* clarify -* semantics
2025-05-19 20:58:59 +00:00