Commit Graph

19996 Commits

Author SHA1 Message Date
Harrison Healey
8b164711a4
MM-63138 Fix some console warnings (#30209)
* Fix forwardRef propTypes console error

The console error that was fixed by this is:
"Warning: forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"

* Fix function component ref console error

This fixes the following error:
Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React. forwardRef ()?
2025-02-14 16:21:52 -05:00
Harrison Healey
b6118b7701
MM-62383 Replace React Bootstrap with Floating UI in Emoji Picker (#29835)
* Convert EmojiPickerOverlay to functional component

* Convert EmojiPickerTabs to functional component

* Extract AddReactionButton from ReactionList

This is so that I can make part of it functional without rewriting
the whole thing.

* Convert PostReaction to functional component

* Add general version of useEmojiPicker and use for AddReactionButton

* Rename returned showEmojiPicker to emojiPickerOpen

* Add test for AddReactionButton

* Move showEmojiPicker state out of useEmojiPicker

I hoped to avoid this by just having the hook return the
show state, but unfortunately, too many of the existing places
rely on controlling the state themselves

* Change PostReaction to use useEmojiPicker

I ran into some trouble with this getting the hover state to properly
disappear from the PostComponent when clicking out of the picker. That
seems to be a downside of the browser's mouseenter/mouseleave not
handling cases where the component is covered up. It doesn't work 100%,
but it works at least as well as master by disabling pointer-events to
the FloatingOverlay (which I also think we could probably remove since
it's supposed to just be for darkening the backdrop behind the picker,
but it ended up being helpful for setting the z-index on mobile).

* Change AdvancedTextEditor to use new useEmojiPicker

I renamed its version of useEmojiPicker to useEditorEmojiPicker since it
still contains information about how to position the emoji or gifs in
the post text.

* Convert EditPost to use useEmojiPicker

* Convert CreateModalNameInput to use useEmoijPicker

* Convert CustomStatusModal to use useEmojiPicker

* Remove EmojiPickerOverlay and cleanup related code

* Remove unneeded translation string

* asdf Attempting to fix E2E test

* Improve how useEmojiPicker positions itself to stay on screen more

* Add offset between Emoji Picker and reference

* Add horizontallyWithin middleware and use it to right-align the emoji picker in the post textbox
2025-02-14 13:53:30 -05:00
Agniva De Sarker
da7192246e
MM-62960: Improve webConn remove performance from hubConnectionIndex (#30178)
When we added iteration by channelID, this was a known tradeoff during that.
However, it has been observed that the regular connection removal function
creates considerable blocking of the processing loop, leading to high
CPU usage and API latencies.

To fix this, we add a reverse mapping of channelIDs to connections
and their positions in the slice. This helps us to remove the connection
from the slice without iteration.

Unfortunately, this still needs to iterate through all channelIDs
during invalidation of the channel member cache. However, the user
cache invalidation is not a regular activity. So it should be an acceptable
tradeoff to make.

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

```release-note
A new config knob ServiceSettings.EnableWebHubChannelIteration which allows a user to control the performance of websocket broadcasting. By default, this setting is turned off. If it is turned on, it improves the websocket broadcasting performance at the expense of poor performance when users join/leave a channel. It is not recommended to turn it on unless you have atleast 200,000 concurrent users actively using MM.
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-14 09:19:36 +05:30
Julien Tant
06d8c92504
Using StringInterface instead of mapStringAny (#30211) 2025-02-14 03:14:08 +00:00
Caleb Roseland
68c11e9ecb
MM-61375: Update file handling for bookmarks (#30034) 2025-02-13 17:11:13 -06:00
Caleb Roseland
2182b1eaf9
MM-62548: CPA Reordering - drag and drop (#30097) 2025-02-13 17:09:35 -06:00
Harrison Healey
b2147476cc
MM-62933 Revert position of post menu to match earlier versions (#30190)
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-13 22:29:54 +00:00
Julien Tant
41e0f97176
Remove call for removed attribute Page (#30207) 2025-02-13 17:35:27 +00:00
Agniva De Sarker
1a58f923e0
[aider assisted] MM-61888: Add ClientSideUserIds field to MetricsSettings (#30127)
We add a new config setting to allow the admin to set a fixed
list of userIDs to track for all client side webapp metrics.

This gives the admin to get a deeper look at how the application
is behaving for a single user.

A new section in the system console is also added for the user
to edit this setting from the UI.

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

```release-note
A new config setting MetricsSettings.ClientSideUserIds is added
where you can set the user ids you want to track for client side webapp
metrics.
```

* fix lint errors

```release-note
NONE
```

* fixing tests

```release-note
NONE
```
2025-02-13 21:10:34 +05:30
Julien Tant
632a60b332
[MM-62553]+[MM-62554] Property Architecture: cursor based pagination (#30119)
* refactor: Replace pagination with cursor-based pagination for custom profile attributes

* remove pagination loop on property value retrieval for CPA

* add migrations to optimize pagination on property fields and values

* adapt test to remove pagination check

* update migrations list

* postgres: drop index concurrently

* concurrent index manipulation must be done outside of a Tx

* fix: Correct SQL index drop syntax from "OM" to "ON" in migration files

* test: Add CountForGroup test cases for property field store

* refactor: Add CountForGroup method to PropertyFieldStore interface and implementations

* Fix style and i18n

* feat: Add optional deleted property field filtering to CountForGroup method

* refactor: Update CountForGroup to support optional deleted property fields

* test: Add comprehensive tests for CountForGroup with includeDeleted parameter

* adapt test + gen layers

* rename property service method and set the includeDelete to false

* refactor: Remove redundant constant and use CustomProfileAttributesFieldLimit directly

* fix tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-13 15:23:50 +00:00
Harrison Healey
4615ca5f28
MM-62944 Fix fileupload settings not being clickable (#30182)
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-13 10:17:41 -05:00
Miguel de la Cruz
f85a8c61a4
Adds websocket messages to Custom Profile Attributes (#30163)
* Adds websocket messages to Custom Profile Attributes

The app layer now fires a websocket event as part of the operations
over Custom Profile Attribute fields and values. It updates as well
the Patch method for CPA values so all the changes are commited as
part of the same transaction.

To be able to do this last operation, the change adds methods to
upsert CPA values in both the store and the property service.

* Fix i18n strings

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
2025-02-13 11:21:46 +00:00
Miguel de la Cruz
5ba80d51ae
Updates the property field and value update methods to use a single query for multiple entities (#30198)
* Updates the property field and value update methods to use a single query for multiple entities

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

Co-authored-by: Julien Tant <785518+JulienTant@users.noreply.github.com>

---------

Co-authored-by: Miguel de la Cruz (aider) <miguel@ctrlz.es>
Co-authored-by: Julien Tant <785518+JulienTant@users.noreply.github.com>
2025-02-13 11:12:51 +00:00
Harshil Sharma
83ec1d9f7d
added window title for scheduled post tab and fixed draft alignment (#30179)
* added window title for scheduled post tab and fixed draft alignment

* i18n fix
2025-02-13 12:11:53 +05:30
Nicolas Le Cam
4a44d23095
Remove docker hack around prometheus service (#28985)
* Remove uneeded hack in docker-compose now that problem is solved

* Remove obsolete attribute `version` in docker compose configuration files

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-12 14:18:53 -04:00
Harrison Healey
55bb6c51eb
MM-62891 Fixed incorrectly applied label in Team Settings modal (#30116) 2025-02-11 10:50:42 -05:00
ayush-chauhan233
9aaa52136c
[MM-61683]: Ensure radio button groups are properly formed (#30013)
* MM-61683: Ensure radio button groups are properly formed

* MM-61683: Fix the failing i18 CI

* MM-61683: Fix desktop notification translation IDs

* MM-61683: Fix lint-style

* MM-61683: Update name attribute inside channel notification modal
Add aria-label inside RadioSettingItem
Update snapshot

* MM-61683: Revert creating a constant for default messages and id

* MM-61683: Add legend tag inside radio setting item component

* MM-61683: Update snapshot

---------

Co-authored-by: Saurabh Sharma <saurabh.sharma@brightscout.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-11 10:46:06 -05:00
Ben Schumacher
d3dcc74e5a
[MM-62762] Make config location in Support Packet human-readable (#30027)
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-11 10:06:27 +01:00
ayush-chauhan233
b2b956c043
[MM-55278]: Fixed autofocus on submenu's first element (#29547) 2025-02-11 11:34:42 +05:30
enzowritescode
169274b3aa
[MM-62864] Bump katex to 0.16.21 (#30095) 2025-02-11 11:18:01 +05:30
Weblate (bot)
dc37cf5cf9
Translations update from Mattermost Weblate (#30157)
Automatic Merge
2025-02-10 19:50:10 +02:00
Maria A Nunez
7efdcda20a
Update User Limits for unlicensed servers (#30134)
* Update user soft and hard limits

* Fix testt

* Fix test
2025-02-10 11:55:42 -05:00
Arya Khochare
f6c4bdf365
[MM-62149] Avoid SELECT * in emoji_store.go (#30082)
* refractored select sql queries

* rm unused makeStringArgs

* linting

* leverage builder pattern

---------

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2025-02-10 12:02:50 -04:00
Jesús Espino
9b87970c99
Migrating other 2 files from javascript to typescript (#29435)
* feat: Add initial store configuration for webapp channels

* refactor: Convert store/index.js to TypeScript with type definitions

* test: Add initial test file for store index

* refactor: Convert index.test.js to TypeScript with type annotations

* Removing old files

* Applying linter fixes

* Fixing some of the types errors

* fix: Type mock implementation of getState in global_actions.test.ts

* test: Add missing GlobalState import in global_actions.test.ts

* fix: Resolve TypeScript mock implementation error in global_actions.test.ts

* Some fixes

* Address CI problems

* Installing zen-observable types

* Addressing PR review comment

* Addressing PR review comment

* Addressing PR review comment

* Addressing PR review comment

* Addressing PR review comment

* Simpliying things

* Fixing CI

* Fixing types
2025-02-10 15:43:09 +01:00
unified-ci-app[bot]
90814564ff
chore: Update NOTICE.txt file with updated dependencies (#30152)
Automatic Merge
2025-02-10 13:50:08 +02:00
Ben Schumacher
0927ecb0f1
[MM-62517] Add audit logs to Support Packet (#29844) 2025-02-10 11:32:04 +01:00
dependabot[bot]
4de0a2c1e6
Bump the github-actions-updates group with 5 updates (#30151)
Bumps the github-actions-updates group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [github/codeql-action](https://github.com/github/codeql-action) | `3.28.8` | `3.28.9` |
| [tj-actions/changed-files](https://github.com/tj-actions/changed-files) | `45.0.6` | `45.0.7` |
| [getsentry/action-release](https://github.com/getsentry/action-release) | `1.9.0` | `1.10.3` |
| [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) | `3.7.0` | `3.8.0` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3.8.0` | `3.9.0` |


Updates `github/codeql-action` from 3.28.8 to 3.28.9
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v3.28.8...v3.28.9)

Updates `tj-actions/changed-files` from 45.0.6 to 45.0.7
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](d6e91a2266...dcc7a0cba8)

Updates `getsentry/action-release` from 1.9.0 to 1.10.3
- [Release notes](https://github.com/getsentry/action-release/releases)
- [Changelog](https://github.com/getsentry/action-release/blob/master/CHANGELOG.md)
- [Commits](f6dfa3d84a...12bba0bd9c)

Updates `sigstore/cosign-installer` from 3.7.0 to 3.8.0
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](dc72c7d5c4...c56c2d3e59)

Updates `docker/setup-buildx-action` from 3.8.0 to 3.9.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](6524bf65af...f7ce87c1d6)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-updates
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-updates
- dependency-name: getsentry/action-release
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-updates
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-updates
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-10 12:21:51 +02:00
Rahim Rahman
55c2d57f70
fix(MM-60645): missing emoji on mobile (#30001)
* fix(MM-60645): missing emoji on mobile

* removing the `:` completely from being stored or being sent to the server.

* proper formatting?
2025-02-09 21:38:29 -07:00
Agniva De Sarker
3698808625
MM-62926: Fix standard logger redirection issue (#30137)
We were redirecting any logging happening via the Go standard logger
to our own mlog instance. The issue is that all those logs were happening
at LvlStdLog level which is higher than LvlDebug.

LvlStdLog is at 10, and LvlDebug is at 5. So unless a customer
sets the log level specifically to "stdlog" or sets up advanced
logging to specifically log for that level, no standard logs will
ever get logged.

We fix this by logging it at warn level. The reason for warn
is that mostly external libraries use this facility to log
out-of-band errors that could not be returned using standard
error returns.

I saw another plugin error which was logged similarly. This
was never surfaced before due to this bug.

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

```release-note
NONE
```
2025-02-08 22:28:04 +05:30
Antonis Stamatiou
ffb3a34289
fix: MM-62714 (#30141) 2025-02-08 13:50:28 +02:00
Rajat Dabade
9f5b13d55d
Upgraded boards version to v9.1.1 for prepackaged (#30072)
* Upgraded boards version to v9.1.0

* Update server/Makefile

Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>

---------

Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
2025-02-08 13:07:26 +05:30
Arya Khochare
b11d536774
[MM-62152] Avoid SELECT * in oauth_store.go (#30080)
* refractored select queries

* test fail fix

* linting issues

* use builder pattern

* simplify GetAuthorizedApps

* revert to base behaviour

---------

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2025-02-07 16:38:49 -04:00
Agniva De Sarker
0bdae41603
MM-61215: Clarify to use --bypass-upload flag (#29761)
https://mattermost.atlassian.net/browse/MM-61215

```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-07 22:12:33 +05:30
Arya Khochare
50258a6510
[MM-62153] Avoid SELECT * in preference_store.go (#30081)
* refractored sql queries

* GetBuilder to Select Builder as preferences is slice (fix failing test)

* test: Add test for GetCategoryAndName preference method

* fix s/GetBuilder/SelectBuilder

* linting

* make mocks

* make store-layers

---------

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2025-02-07 12:05:29 -04:00
Ibrahim Serdar Acikgoz
a3f22bd349
[MM-62004] update threads after a channel gets moved (#29624) 2025-02-07 15:20:13 +00:00
Jesse Hallam
3aaa379687
Correctly detect branch to decide if notifying (#30142)
I had previously made a change to check `github.ref`, not realizing that
this particular workflow always runs from `master` from a workflow
completed on a different branch. Use
`github.event.workflow_run.head_branch` instead.
2025-02-07 11:16:00 -04:00
Nick Misasi
e475568d6d
[MM-62669] Updates to cloud specific imagery in system console (#29963)
* Updates to cloud specific imagery in system console

* Revert something from images

* Fix linter

* Updates from PR feedback

* Fix lint

* Add svg

* Lint fixes, update another SVG

* change to pre-existing already-themed version of svg

* change the folder of the file

* add file

* Adjust styling
2025-02-07 09:34:09 -05:00
unified-ci-app[bot]
144986c1ad
Update latest minor version to 10.6.0 (#30138)
Automatic Merge
2025-02-07 11:20:09 +02:00
Jesse Hallam
7d9521d783
MM-62142: remove SELECT * from status store (round 2) (#30060)
* Revert "Revert "[MM-62142] Avoid SELECT * in status_store.go (#29610)" (#29985)"

This reverts commit d345e92136.

* add tests for StatusGet and StatusGetByIds

* handle NULL columns in the Status Store

* simplify status store

* more builder simplifications and tests

* expose GetQueryPlaceholder

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-06 12:36:31 -04:00
Agniva De Sarker
c4718e4542
MM-60211: Bump dependencies (#30005)
https://mattermost.atlassian.net/browse/MM-60211
```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-06 21:48:08 +05:30
Agniva De Sarker
d34dcc2dda
MM-62901: Apply constLabels on all metrics (#30125)
When the client side metrics were added constLabels
got missed out. Without this, we cannot do the high
level grouping by rings.

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

```release-note
NONE
```
2025-02-06 21:45:57 +05:30
Christopher Poile
50c7f1df12
[MM-62876] Bulk export warnings (#30105)
* err -> appErr

* record warnings in job.Data, and output them to warnings.txt

* tests
2025-02-06 10:34:34 -05:00
Harshil Sharma
35e776d805
Removed Elasticsearch and Opensearch channel index schedma check (#30102) 2025-02-06 11:50:37 +05:30
Christopher Poile
8b65771a31
[MM-62897] Compliance export backwards compatibility (#30120)
* add backwards compatibility for <10.5

* test: backwards compatibility for <10.5

* spelling
2025-02-05 21:20:28 +00:00
Christopher Poile
1ce29f8466
[MM-60989] Add SelectBuilderCtx to simplify db code (#29988)
* add SelectBuilderCtx; change the few calls where it's appropriate to use

* tests (wip)

* tests improved

* use SelectCtx's own WithTimeout

* improve tests based on PR feedback

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-05 16:06:43 -05:00
dependabot[bot]
97e2a4382b
Bump the github-actions-updates group across 1 directory with 7 updates (#30090)
Bumps the github-actions-updates group with 7 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [actions/setup-node](https://github.com/actions/setup-node) | `4.1.0` | `4.2.0` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `6.10.0` | `6.13.0` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3.27.9` | `3.28.8` |
| [tj-actions/changed-files](https://github.com/tj-actions/changed-files) | `45.0.5` | `45.0.6` |
| [getsentry/action-release](https://github.com/getsentry/action-release) | `1.7.0` | `1.9.0` |
| [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) | `4.0.2` | `4.0.3` |
| [mikepenz/action-junit-report](https://github.com/mikepenz/action-junit-report) | `5.2.0` | `5.3.0` |



Updates `actions/setup-node` from 4.1.0 to 4.2.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](39370e3970...1d0ff469b7)

Updates `docker/build-push-action` from 6.10.0 to 6.13.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](48aba3b46d...ca877d9245)

Updates `github/codeql-action` from 3.27.9 to 3.28.8
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v3.27.9...v3.28.8)

Updates `tj-actions/changed-files` from 45.0.5 to 45.0.6
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](bab30c2299...d6e91a2266)

Updates `getsentry/action-release` from 1.7.0 to 1.9.0
- [Release notes](https://github.com/getsentry/action-release/releases)
- [Changelog](https://github.com/getsentry/action-release/blob/master/CHANGELOG.md)
- [Commits](e769183448...f6dfa3d84a)

Updates `aws-actions/configure-aws-credentials` from 4.0.2 to 4.0.3
- [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases)
- [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md)
- [Commits](e3dd6a429d...4fc4975a85)

Updates `mikepenz/action-junit-report` from 5.2.0 to 5.3.0
- [Release notes](https://github.com/mikepenz/action-junit-report/releases)
- [Commits](62516aa379...ee6b445351)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-updates
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-updates
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-updates
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-updates
- dependency-name: getsentry/action-release
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-updates
- dependency-name: aws-actions/configure-aws-credentials
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-updates
- dependency-name: mikepenz/action-junit-report
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-05 18:27:34 +01:00
Jesse Hallam
f08580ec09
t.Skip flaky TestUpdateOAuthApp (#30118)
Fixes: https://mattermost.atlassian.net/browse/MM-62895
2025-02-05 17:25:51 +00:00
Julien Tant
bcc395d139
[MM-62552] Custom Profile Attributes: use json.RawMessage for the value. (#29989)
* refactor: Move property value sanitization to model layer

* feat: Add value sanitization for custom profile attributes

* refactor: Update custom profile attributes to use json.RawMessage

* refactor: Update patchCustomProfileAttribute to handle json.RawMessage directly

* refactor: Refactor custom profile attributes handler with improved validation

* refactor: Rename `patchCustomProfileAttribute` to `patchCPAValues`

* refactor: Replace ReturnJSON with json.NewEncoder and add error logging

* feat: Add encoding/json import to property_value.go

* refactor: Update property value tests to use json.RawMessage

* fix: Convert string value to json.RawMessage in property value test

* fix: Convert string literals to json.RawMessage in property value tests

* fix: Add missing encoding/json import in custom_profile_attributes.go

* fix: Preserve JSON RawMessage type in listCPAValues function

* fix: Update custom profile attributes test to use json.RawMessage

* feat: Add json import to custom_profile_attributes_test.go

* refactor: Update ListCPAValues and PatchCPAValues to use json.RawMessage

* refactor: Rename `actualValue` to `updatedValue` in custom profile attributes test

* refactor: Improve user permission and audit logging for custom profile attributes patch

* refactor: Optimize CPA field lookup by using ListCPAFields() and map

* fix: Correct user ID reference in custom profile attributes patch endpoint

* refactor: Change patchCPAValues to use map[string]json.RawMessage for results

* refactor: format and fix tests

* test: Add comprehensive unit tests for sanitizePropertyValue function

* test: Add test case for invalid property value type

* feat: Use `model.NewId()` to generate valid IDs in custom profile attributes tests

* refactor: Replace hardcoded IDs with dynamic variables in custom profile attributes test

* refactor: restore variable name

* refactor: drop undesired changes

* chore: refresh app layers

* feat: Update API definition to support string or string array values for custom profile attributes

* test: Add test cases for multiselect custom profile attribute values

* test: Add tests for multiselect custom profile attribute values

* test: Isolate array value test in separate t.Run

* test: Add test case for multiselect array values in custom profile attributes

* refactor: Move array value test from TestCreateCPAField to TestPatchCPAValue

* test: Update custom profile attributes test assertions

* test: add test case for handling array values in GetCPAValue

* test: Add array value tests for property value store

* refactor(store): no need to convert to json the rawmessage

* chore: lint

* i18n

* use model to interface with sqlx

* fix: Allow empty strings for text, date, and select profile attributes

* refactor: Filter out empty strings in multiselect and multiuser fields

* refactor: Update multiuser field sanitization to validate and error on invalid IDs

* refactor: Simplify sanitizePropertyValue function with reduced code duplication

* fix: Allow empty user ID in custom profile attribute sanitization

* refactor: Convert comment-based subtests to nested t.Run in TestSanitizePropertyValue

* refactor: Convert comment-based subtests to nested t.Run tests in TestSanitizePropertyValue

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-02-05 17:21:22 +00:00
Christopher Poile
6560b4c0cf
[MM-62845] Fix: Compliance export download link fails from S3 when using a dedicated file store (#30092)
* add ExportZipReader and use that for job exports

* fix legacy code to use ExportFileReader
2025-02-05 07:31:07 -05:00
Christopher Poile
3a73b517e2
[MM-62775] Fix: Bulk export not completing (#30044)
* do not error on exportFile error

* add tests for local and s3 storage exporting with missing file

* linting

* fix attachment path validation in mmctl
2025-02-04 17:56:11 -05:00