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

1938 Коммитов

Автор SHA1 Сообщение Дата
Jesse Hallam
eb851684e9 MM-62162: Replace SELECT * in user_access_token_store.go (#30421)
* MM-62162: Replace SELECT * in user_access_token_store.go

- Replaced all SELECT * queries with explicit column selection
- Used query builder instead of raw SQL strings for all queries
- Added reusable userAccessTokensSelectQuery in the store constructor
- Added comprehensive test for pagination and IsActive flag

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

* Fix code formatting in user_access_token_store test file

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

* MM-62162: Update UserAccessToken Search method to use explicit column names

- Fixed "ambiguous column" errors by explicitly naming columns with table qualifiers
- Added test for the Search functionality

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

* MM-62162: Update UserAccessToken Search method to use explicit column names

- Fixed "ambiguous column" errors by explicitly naming columns with table qualifiers
- Maintained exact semantics of original query's LIKE filters
- Refactored to use query builder instead of raw SQL

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

* MM-62162: Update UserAccessToken Search method to use reusable query

- Modified userAccessTokensSelectQuery to use fully qualified column names
- Updated Search method to use the existing query builder
- Fixed "ambiguous column" errors by using full column qualifiers

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

* MM-62162: Remove unnecessary comment in user_access_token_store.go

Removed redundant comment in Search method explaining the use of qualified column names, as the code is self-documenting.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

* MM-62162: Use t.Cleanup() for token cleanup in userAccessTokenPagination test

* MM-62162: Handle error in Cleanup function

* linting

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-03-31 13:47:43 -03:00
Ben Schumacher
166a676fe5 Enforce use of any instead of interface{} (#30588) 2025-03-31 10:44:34 +02:00
Jesse Hallam
9aa4818c71 MM-62154: Avoid SELECT * in webhook_store.go (#30463)
* MM-62154: Avoid SELECT * in webhook_store.go

- Defined column list functions for both IncomingWebhooks and OutgoingWebhooks tables
- Converted all uses of SELECT * to use the column list functions
- Used the QueryBuilder pattern for SQL queries for better consistency and readability

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

* MM-62154: Improve webhook store implementation using query builders

- Refactored webhook store to follow session_store.go pattern
- Added select query builders in the constructor
- Used pre-built queries throughout the store implementation for better maintainability and performance
- Removed redundant incomingWebhookColumns() and outgoingWebhookColumns() functions

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

* MM-62154: Fix whitespace style issues in webhook_store.go

- Ran gofmt to remove trailing whitespace
- Ensures consistent code formatting

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

* MM-62154: Remove unnecessary int(0) casting

- Simplified DeleteAt=0 condition by removing redundant int casting
- Maintains same behavior while making code cleaner

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-03-28 21:58:26 +00:00
Jesse Hallam
b1a8810bd8 MM-62160: Avoid SELECT * in user_terms_of_service.go and terms_of_service_store.go (#30423)
* MM-62160: Avoid SELECT * in user_terms_of_service.go

- Added userTermsOfServiceSelectQuery in the constructor
- Replaced raw SQL query with query builder pattern
- Used explicit column selection instead of SELECT *
- Made the implementation more resilient to schema changes

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

* MM-62160: Also avoid SELECT * in terms_of_service_store.go

- Added termsOfServiceSelectQuery field to store struct
- Replaced SELECT * with explicit column selection
- Updated GetLatest and Get methods to use the query builder pattern
- Made the implementation more resilient to schema changes

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-03-28 15:44:52 -03:00
Harrison Healey
0079289224 MM-63577 Enable EnableLocalMode automatically during development (#30583) 2025-03-28 12:59:43 -04:00
Matthew Birtch
59cd90a36f MM-61983 Update default bot image (#30539)
* updated default bot image

* Update bot_default_icon.png

* go:embed a copy of the new bot default icon

* updated bot avatar used for e2e tests

---------

Co-authored-by: Jesse Hallam <jesse@mattermost.com>
2025-03-28 10:49:09 -03:00
Ibrahim Serdar Acikgoz
c44c139c9e [MM-63595] Add model structs for Access Control Policies (#30589) 2025-03-28 13:19:53 +00:00
Jesse Hallam
2108216818 Only build and package linux (#30582)
As part of https://github.com/mattermost/mattermost/pull/29932, we
stopped packaging Windows for releases. Let's go one step further and
stop building it too (saves build time!). And while we're in here, stop
doing this for OSX as well.

Both these targets remain buildable on demand, but we don't support
these platforms for production deployments.
2025-03-28 09:13:50 -03:00
Jesse Hallam
63e85a3a2b MM-62155: Avoid SELECT * in team_store.go (#30464)
* MM-62155: Avoid SELECT * in team_store.go

- Added explicit column lists for all SELECT queries
- Created teamSelectQuery for reused queries
- Replaced raw SQL queries with query builder pattern

* Refactor getTeamMembersWithSchemeSelectQuery to use teamMembersQuery builder

Instead of duplicating TeamMembers columns, use the existing builder to avoid redundancy.

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

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

* Remove redundant comments from getTeamMembersWithSchemeSelectQuery

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

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-03-28 09:12:37 -03:00
Ben Schumacher
6c8235d031 Fix missing errors in mmctl output (#30567) 2025-03-28 09:30:41 +01:00
Ben Schumacher
4156112f7c Return error as last value in BulkImport functions (#30575) 2025-03-27 20:17:20 +01:00
Daniel Espino García
7999239ccf Add system console settings for mobile security (#30456)
* Add config settings for additional security features on mobile

* Add system console settings for mobile security

* Update svg and link

* Fix strings

* Add test for the discovery feature

* Fix tests

* Add permission migrations

* Add relevant e2e tests

* Fix key alignment

* fix tests

* Fix lint

* Mock new migration

* Fix playwright prettier

* Add new section to delegated permissions

* Update snapshots

* Fix flakyness in playwright test

---------

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-03-27 13:13:20 +01:00
jachewz
e4f1ff75ba fix admin_test not closing correct servers (#30531) 2025-03-26 19:06:44 +01:00
AulakhHarsh
3954d2f346 Add e2e tests for showCommandCmdF (#30059)
* add e2e tests for showCommandCmdF

* resolve review comments

* add err check

* remove debug statement

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-03-26 18:05:10 +00:00
Julien Tant
c440a3223e [MM-63513] Turn Cross team search feature flag into a setting option (#30518)
* feat: Add EnableCrossTeamSearch configuration option to ServiceSettings

* feat: Add EnableCrossTeamSearch configuration option to ServiceSettings

* feat: Enable cross-team search by default

* include old FF in client config
2025-03-26 10:37:12 -07:00
Chris Gibson
65256843f9 [GH-30056] Refactor SELECT statements in compliance_store.go (#30124)
* Change queries to use builder

* extract to tableSelectQuery

* Apply suggestions from code review

* update tests to check errors, lengths

* linting

* leverage s.toReserveCase

---------

Co-authored-by: Jesse Hallam <jesse@thehallams.ca>
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-03-26 10:23:08 -03:00
Julien Tant
48ea65aa5f [MM-56078] mmctl: assume local mode when no credentials found (#26215)
* assume local mode when no credentials found

* Use variable

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2025-03-26 13:21:21 +01:00
Claudio Costa
d66fbd1425 Implement BenchmarkFileStore (#30524) 2025-03-25 11:42:13 -06:00
Ben Schumacher
3b50ea2621 Skip flaky TestGetUserStatus/dnd_status_timed_restore_after_time_interval (#30534) 2025-03-25 08:09:47 +01:00
Agniva De Sarker
8faa8b2e56 MM-63545: Fix post reminder off-by-one error (#30553)
We used < which meant we missed sending
reminders created for that timestamp, because
the job runs on that exact time.

Using <= to fix that.

https://mattermost.atlassian.net/browse/MM-63545
```release-note
NONE
```
2025-03-25 11:09:42 +05:30
Weblate (bot)
26892de25b Translations update from Mattermost Weblate (#30550)
* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (2618 of 2618 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/uk/

* Translated using Weblate (Russian)

Currently translated at 94.9% (5783 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/ru/

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (6089 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (German)

Currently translated at 100.0% (2618 of 2618 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/de/

* Translated using Weblate (German)

Currently translated at 99.9% (6084 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/de/

* Translated using Weblate (Dutch)

Currently translated at 99.7% (2612 of 2618 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/nl/

* Translated using Weblate (German)

Currently translated at 100.0% (6089 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/de/

* Translated using Weblate (Dutch)

Currently translated at 99.9% (6088 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nl/

* Translated using Weblate (Polish)

Currently translated at 100.0% (2618 of 2618 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/pl/

* Translated using Weblate (Polish)

Currently translated at 100.0% (6089 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/pl/

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (6089 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (6089 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 68.7% (4184 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (6089 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (6089 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (6089 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Polish)

Currently translated at 100.0% (6089 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/pl/

* Translated using Weblate (Czech)

Currently translated at 100.0% (2618 of 2618 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/cs/

* Translated using Weblate (Czech)

Currently translated at 99.9% (6088 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/cs/

* Translated using Weblate (English (Australia))

Currently translated at 99.9% (2617 of 2618 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/en_AU/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (6089 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/en_AU/

* Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (2618 of 2618 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/zh_Hans/

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (6089 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (6089 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/zh_Hans/

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (6089 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 69.0% (4207 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/

* Translated using Weblate (Czech)

Currently translated at 100.0% (2618 of 2618 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/cs/

* Translated using Weblate (Czech)

Currently translated at 100.0% (6089 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/cs/

* Translated using Weblate (Polish)

Currently translated at 100.0% (6089 of 6089 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/pl/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/

---------

Co-authored-by: Bohdan <bshumylo@yahoo.com>
Co-authored-by: Konstantin <eleferen@gmail.com>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: Frank Paul Silye <frankps@gmail.com>
Co-authored-by: Serhii Khomiuk <sergiy.khomiuk@gmail.com>
Co-authored-by: Karel Trojan <kareltrojan+mattermost@gmail.com>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: ThrRip <coding@thrrip.space>
Co-authored-by: Martin Mičuda <micuda@rematiptop.cz>
2025-03-24 13:34:01 -03:00
Claudio Costa
e495fb3182 Prepackage Metrics Plugin v0.6.0 (#30529) 2025-03-20 13:39:53 -06:00
Julien Tant
cb89e5646e [MM-62695] Extend property types for CPA (#30201)
* test: Add unit tests for custom profile attributes select options

* feat: Add custom profile attributes model with validation and constants

* refactor: Trim spaces from name and color in custom profile attribute select option constructor

* gofmt

* refactor: Fix typo in custom profile attributes select option function name

* feat: Add IsValid method to validate CustomProfileAttributesSelectOptions

* refactor: Replace map[string]bool with map[string]struct{} for key existence check

* refactor: Rename NewCustomProfileAttributeSelectOption to NewCustomProfileAttributesSelectOption

* feat: Add validation to prevent empty custom profile attribute options

* refactor: Add validation and creation methods for custom profile attributes

* feat: Add index number to validation error messages in custom profile attributes

* fix tests

* add default visibility

* feat: Add comprehensive test cases for custom profile attributes field validation

* fix: Update custom profile attributes map keys to use capitalized names

* feat: Add support for lowercase and title case keys in custom profile attributes map

* test: Add comprehensive test for NewCustomProfileAttributesSelectOptionFromMap

* feat: Add validation for custom profile attributes fields

* refactor: Update CustomProfileAttributesSelectOption constructor to prioritize ID parameter

* test: Add test cases for preserving IDs in custom profile attributes

* feat: Enhance ID validation and trimming in custom profile attributes

* don't do validation in constructor

* test: Add test case for preserving option IDs when patching select field

* improve test

* i18n

* refactor: Modify CustomProfileAttributesSelectOption to use lowercase JSON keys

* fix casing in custom profilte attributes test

* refactor: Use consistent "ValidateCPAField" in error messages for custom profile attributes

* use custom types rather than string

* lint

* fix api test

* refactor: Make color field optional in custom profile attributes

* style

* generic options

* removed unused i18n

* test: Add tests for NewCPAFieldFromPropertyField and CPAFieldToPropertyField

* test: Add test case for property field with empty attributes

* refactor: Cleanup whitespace and remove empty Attrs in custom profile attributes test

* test: Add test case for CPA field with empty attributes

* refactor: Improve custom profile attributes field handling and validation

* refactor: Move validateCustomProfileAttributesField to Validate method on CPAField struct

* use CPAField

* code style

* add validation and tests

* tests

* i18n

* err->appErr

* fix TestDeleteCPAField test

* i18n

* Add SAML and LDAP attr

* rename CustomProfileAttributes in method to CPA

* rename CPASortOrder method

* rearrange consts

* use Len test method

* sanitize and validate

* manage error the same way property field and value do

* fix: Update test error ID for custom profile attributes validation

* test: Update error ID expectations in custom profile attributes tests

* refactor: Convert CPAAttrs.SortOrder from string to int

* json uses float64

* feat: Add length validation for custom profile attribute option name and color

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-03-20 18:47:40 +00:00
Ben Schumacher
9b5d8d52bf [MM-62427] Add message attachments validation (#30180)
* Add message attachments validation

* Add props validation

* Validate slack attachment fields

* Update tests and library usage

* Improve interactive dialog error for length checks

* Allow predefined colors for slack attachments

* Fix TestPostAction

* Use const for data source

* Add tests

* Cleanup unused props

* Add happy path tests

* lint fixes

* Add validation for PostActionOptions
2025-03-20 12:53:50 +01:00
Agniva De Sarker
5609489e86 MM-62900: Avoid redundant query for channelID while indexing file (#30289)
The file already has the ChannelID field. Therefore, we avoid querying
the database again. This sometimes causes errors in customer environments
where  there is noticeable replication lag, causing files not to be
indexed entirely.

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

```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-03-20 11:46:44 +05:30
Agniva De Sarker
a51a8e9b60 MM-62964: Skip setting replica lag handle in case of an error (#30498)
Previously, we would set it to nil pointer which would eventually
cause a panic when ReplicaLagAbs/ReplicaLagTime would get called.

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

```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-03-20 11:38:29 +05:30
Harrison Healey
3b9f9b209a MM-63350 Add tests for inviting guest users to teams (#30448)
* MM-63350 Add tests for inviting guest users to teams

* Fix style issue

* Fix one more issue
2025-03-19 17:27:33 -04:00
Ben Schumacher
2e44a6a1ed Improve error message for failed file copied (#30418) 2025-03-19 19:48:26 +01:00
Ben Schumacher
d7d8b4163e [MM-63442] Fix GET /groups endpoint docs (#30473)
* Fix GET /groups endpoint docs

* Extend groups endpoint tests
2025-03-19 19:38:37 +01:00
Jesse Hallam
594e8d3171 MM-62159: Avoid SELECT * in channel_store_categories.go (#30424)
* MM-62159: Avoid SELECT * in channel_store_categories.go

- Added sidebarCategorySelectQuery field to SqlChannelStore struct
- Replaced SELECT * with explicit column selection in GetSidebarCategory and getSidebarCategoriesT functions
- Updated raw SQL query in addChannelToFavoritesCategoryT to use explicit column selection
- Made the implementation more resilient to schema changes

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

* use sc alias, simplify

* MM-62159: Fix ambiguous ID column in sidebar category queries

- Modified sidebarCategorySelectQuery initialization to explicitly use "sc" table alias for all columns
- Prevents "Column 'Id' in field list is ambiguous" error when joining with other tables

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

* MM-62159: Consistently use table aliases in sidebar categories queries

- Added 'sc' table alias to all sidebar category queries
- Ensures consistency and avoids ambiguous column errors in future joins

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

* MM-62159: Replace 'sc' alias with full 'SidebarCategories' table name

- Replaced all instances of the 'sc' alias with the full table name 'SidebarCategories'
- Updated the SidebarCategories query builder to use the full table name
- Removed commented-out debug printf statement

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-19 10:49:19 -03:00
Agniva De Sarker
8eadf849bb MM-60790: Prevent stemming in DB search when search term is a fully quoted string (#30214)
When a search term is a fully quoted string, we want to avoid
stemming if it is supported by the search backend.

For Postgres, it does provide a feature by which if we use the
"simple" search config, then no stemming is performed and an exact
match with the word is done without having to resort
to LIKE queries.

Unfortunately, for ES/OS this is not an option because
the message field is a text field, which means ES/OS will analyze it,
stem it and store it in its root form. Therefore, no exact match
can be possible with ES/OS.

The only solution here is to have yet another keyword field
for message which will store it in its raw form. But this
will effectively double the disk storage for post indices
and not a good design choice.

Ref: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html#avoid-term-query-text-fields

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

```release-note
NONE
```

* re-arrange the tests to run only on DB

```release-note
NONE
```

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-03-19 12:10:29 +05:30
Weblate (bot)
c95968c380 Translations update from Mattermost Weblate (#30502)
Automatic Merge
2025-03-17 17:53:15 +02:00
Alejandro García Montoro
350714f390 Bump Go to v1.23.7 (#30455)
* Update Go version to v1.23.7

* Bump golangci-lint to a version supporting Go 1.23

* Fix golangci-lint warnings

Several rules from gosimple, revive and staticcheck linters were
failing:
- Redefinition of built-in identifiers (max, min, new, recover...)
- Use of printf-like functions with simple strings
- Check for nil slices, when len already takes it into account

* Trigger Build

* Trigger Build

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-03-17 14:22:07 +01:00
Christopher Poile
c049748b88 [MM-63314] Fix ClaimJob in HA environments (#30383)
* ClaimJob now returns newly claimed job

* internal code affected by change

* test changes required

* two branches: for mysql, use transaction; for postgres, use returning

* two branches: for mysql, use transaction; for postgres, use returning

* use same millis value for LastActivityAt and StartAt

* blank commit

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-03-14 10:24:26 -04:00
Ben Cooke
ccd8a60168 Plugin groups (#30320)
* add new pluginapi methods

* SAML login hook

* set ReAddRemovedMembers to true for plugin groups

* change to DoLogin signature for SAML
2025-03-13 12:00:15 -04:00
Claudio Costa
0e0e54446d Prepackage Calls v1.6.0 (#30461) 2025-03-13 09:34:50 -06:00
Arya Khochare
4fbfd84957 [MM-61691] Deleting drafts when permanently deleting a user (#30233)
* deleting drafts on permanently deleting user

* verified count of drafts before deleting

* i18n fix

* use ExecBuilder

* changed error message to specify user

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>
2025-03-13 19:19:38 +05:30
Elias Nahum
3af8d50bbe Add config settings for additional security features on mobile (#30411) 2025-03-13 19:39:19 +08:00
Harshil Sharma
84fa496c69 Added missed license check for channel banner in patch channel API (#30445)
* Added missed license check for channel banner in patch channel API

* Extractced permission check function
2025-03-13 12:38:29 +05:30
Ben Cooke
eb967b6b6d MM-61707 (#29606)
* updating maxattempts for ldap
2025-03-12 18:22:03 -04:00
Jesse Hallam
9fc83f24b5 MM-62161: Replace SELECT * in session_store.go (#30422)
* MM-62161: Replace SELECT * in session_store.go

- Replaced all SELECT * queries with explicit column selection
- Used query builder instead of raw SQL strings where possible
- Added reusable sessionSelectQuery in the store constructor
- Added comprehensive test for GetSessionsWithActiveDeviceIds

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

* Fix variable shadowing issues in session_store.go

Resolved variable shadowing by reassigning to the existing error variables instead of declaring new ones in scoped blocks.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

* Fix code formatting in session_store test file

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-12 19:35:33 +00:00
Julien Tant
9f1ec59fa0 [MM-62133] Activate crossteam search by default (#30348)
* activate cross team search by default

* fix e2e test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-03-12 10:24:39 -07:00
Jesse Hallam
fe7d6dcc13 MM-63420: skip flaky tests (#30457) 2025-03-12 15:45:15 +00:00
unified-ci-app[bot]
b365967329 Update latest minor version to 10.7.0 (#30449)
Co-authored-by: unified-ci-app[bot] <121569378+unified-ci-app[bot]@users.noreply.github.com>
2025-03-12 11:58:12 +02:00
Claudio Costa
7c25de2cff [MM-63345] Address Go v1.23 incompatibility issues with plugins (#30386)
* Address Go v1.23 incompatibility issues with plugins

* Install multiple Go versions for compatibility tests

* Rename
2025-03-11 17:44:42 +00:00
Claudio Costa
1c6a130787 Prepackage Calls v1.5.2 (#30437) 2025-03-10 13:24:42 -06:00
Weblate (bot)
9a60b11486 Translations update from Mattermost Weblate (#30435)
* Translated using Weblate (Polish)

Currently translated at 100.0% (2609 of 2609 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/pl/

* Translated using Weblate (Russian)

Currently translated at 96.5% (2520 of 2609 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/ru/

* Translated using Weblate (German)

Currently translated at 100.0% (2609 of 2609 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/de/

* Translated using Weblate (Ukrainian)

Currently translated at 99.8% (2604 of 2609 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/uk/

* Translated using Weblate (Ukrainian)

Currently translated at 96.6% (5869 of 6074 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Ukrainian)

Currently translated at 97.0% (5895 of 6074 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Ukrainian)

Currently translated at 97.1% (5901 of 6074 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Ukrainian)

Currently translated at 97.6% (5932 of 6074 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Ukrainian)

Currently translated at 98.8% (6005 of 6074 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Ukrainian)

Currently translated at 99.0% (6017 of 6074 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 2.6% (70 of 2609 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/nb_NO/

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 66.9% (4064 of 6074 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (2609 of 2609 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/uk/

* Translated using Weblate (Ukrainian)

Currently translated at 99.1% (6020 of 6074 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 67.0% (4074 of 6074 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/

* Translated using Weblate (Spanish)

Currently translated at 75.7% (4599 of 6074 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/es/

* Translated using Weblate (Ukrainian)

Currently translated at 99.1% (6025 of 6074 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Danish)

Currently translated at 11.4% (694 of 6074 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/da/

* Translated using Weblate (Ukrainian)

Currently translated at 99.2% (6026 of 6074 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Ukrainian)

Currently translated at 99.8% (6067 of 6074 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

---------

Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: Konstantin <eleferen@gmail.com>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: Bohdan <bshumylo@yahoo.com>
Co-authored-by: Frank Paul Silye <frankps@gmail.com>
Co-authored-by: Serhii Khomiuk <sergiy.khomiuk@gmail.com>
Co-authored-by: Carloswaldo <waldosaurio@gmail.com>
Co-authored-by: Allan Kimmer Jensen <hi@akj.io>
2025-03-10 16:11:28 -03:00
Miguel de la Cruz
c5e6d9f570 Updates the property service and store method signatures (#30103)
* Updates the property service and store method signatures

Getters can now receive a `groupID` that narrows down the query if
present, so it's not necessary to check for the group ID on the
returning values from the outside layers.

The Search methods now receive the `groupID` and the `targetID`
explicitly as parameters, incentivizing the use of the indexes that
the underlying tables have on the searches.

* Fix tests

---------

Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-03-10 14:26:47 +00:00
Scott Bishel
5fe7c36457 make sure RestrictSystemAdmin returns for all users access system console (#30384)
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-03-08 08:13:19 -07:00
Claudio Costa
e549aaffb0 Fix incorrect error handling in api4.downloadJob (#30410) 2025-03-06 08:04:39 -06:00