Commit Graph

18255 Commits

Author SHA1 Message Date
Scott Bishel
68be318fa2
MM-55608:check invite guest permission (#25708)
* check for invite_guest permission when inviting guests

* update description for invite_guest

* check team permission first

* update returned error

* update from review comments

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-01-15 08:51:50 -08:00
Christopher Poile
b162267387
MM-56163 - Update prepackaged calls to v0.23.0 (#25922) 2024-01-15 11:10:48 -05:00
Dinesh A
f8b2d1bd86
[GH-25023] Add in-product Academy link to Search training (#25509)
* Feat - Added product academy link to search training

* Fix - Added hover effect on product-Academy-link-to-Search-training

* Fix CI

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
2024-01-15 08:53:11 -05:00
Daniel Espino García
77bdeb1c2b
Migrate profile popover from class to functional component (#25608)
* Migrate profile popover from class to functional component

* Fix lint

* Fix tests and minor fixes

* Address feedback

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-01-15 09:28:43 +01:00
mkaraki
23fcb7728f
[MM-11777] Add WebP preview support on web (#25784)
* Add webp to webapp image extension list

* Add test webp image and test code

* Change webp test image and move path

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-01-15 14:30:22 +08:00
Agniva De Sarker
f2b488932d
MM-56355: Use same number of hubs as CPUs (#25798)
We randomly used double the number of hubs. A proper test indicates
that using the same number of hubs as CPUs gives better performance.

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

```release-note
NONE
```
2024-01-13 08:56:16 +05:30
Maria A Nunez
f857af64f2
Fixed actived users and added mau in true up report (#24921)
* Fixed actived users and added mau in true up report

* Temp disable of true up calendar checks for testing

* Revert "Temp disable of true up calendar checks for testing"

This reverts commit 73055bdb25.

* Added unit test

* Linting

* Typo

* Forgot the pain of linting

* Added dau

* Create imports.go

* Fix merge error

* Fixed test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-01-11 21:28:58 -05:00
Harshil Sharma
3047700c0b
Added count exceeded warning (#25817)
* Added count exceeded warning

* lint fix

* Updated message

* Update server/channels/app/user.go

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

* added check for activating user

* Updated copy

---------

Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
2024-01-12 06:48:52 +05:30
Harrison Healey
4d96c11314
MM-56083 Add PatchMultipleMembersNotifyProps plugin API (#25690)
* Add ChannelStore.UpdateMultipleMembersNotifyProps

* Make UpdateMultipleMembersNotifyProps return updated values from the DB

* Add UpdateChannelMembersNotifications plugin API

* Extract i18n

* Fix style

* Make layers

* Change to PatchMultipleMembersNotifyProps

* Add limit to PatchChannelMembersNotifyProps

* Add additional unit tests

* Address feedback

* Lowercase decodeJSON

* Have PatchMultipleMembersNotifyProps update LastUpdateAt

* Fix tests that relied on unreliable return order

* Fix i18n
2024-01-11 13:24:52 -05:00
Nick Misasi
aafe7439af
[CLD-6894] Add 60, 30, and 7 day reminder emails for Cloud Renewals (#25883)
* Add email notifications for Cloud Renewals

* Updates

* Updates

* Update app-layers

* make build-templates

* Add ability to set an env variable as a unix timestamp in s as the current date when getting DaysToExpiration

* Add a mechanism to ensure at least one admin receives every email

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Gabe Jackson <3694686+gabrieljackson@users.noreply.github.com>
2024-01-11 13:07:41 -05:00
Agniva De Sarker
04cf1ed114
Bump up the minimum required MySQL version (#25465)
MySQL 5.7 is at end of life.

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

```release-note
We bump up minimum MySQL version to be 8.0.0
```


Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
2024-01-11 22:18:20 +05:30
Miguel de la Cruz
4ab6b98c63
Removes enterprise deletion from nuke make target (#25896) 2024-01-11 16:04:55 +01:00
M-ZubairAhmed
2676caa52f
[MM-56318] Global warning banners of user limit for admins (#25797)
* get data to store

* inin

* added inside loadme

* useCWSAvailabilityCheck hook improve

* modal airgap

* the bar

* Update announcement_bar_controller.tsx

* Update true_up_review.tsx

* csw

* fixes

* fixed

* more tests

* icon changed

* changes

* Extended tests

* Update index.ts

* redux harrison changes

* Updated copy

* Lint fixes

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: harshil Sharma <harshilsharma63@gmail.com>
2024-01-11 19:41:04 +05:30
Daniel Espino García
539412b353
Fix MM53643 (#25683)
* Fix MM53643

* Add test

* Remove unneeded part of a test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-01-11 10:52:39 +01:00
Agniva De Sarker
1d879ed0f4
MM-55295: Improve DB performance of some (Take 2) (#25865)
* Revert "Revert "MM-55295: Improve DB performance of some APIs (#25318)" (#25852)"

This reverts commit 077221a940.

* Fix the issue

```release-note
NONE
```

* lint fix

```release-note
NONE
```
2024-01-11 10:18:36 +05:30
Devin Binnie
43cca04f04
[MM-56174] Account for archived channels in channel member for post permission check (#25837)
* [MM-56174] Account for archived channels in channel member for post permission check

* Add tests
2024-01-10 15:50:00 -05:00
Nick Misasi
1d108f0d9f
[CLD-6538] Renewal Card for Cloud Purchase Modal, remove unnecessary components (#25606)
* Add renewal card component to purchase modal, remove some unneeded components

* Add back commented code

* Fixes for pipelines

* Delinquency modal skips invoice summary table if there is only one invoice

* Updates

* Fixes from ms precision changes

* Fixes for tests after ms precision changes

* A couple more occurrences

* Removal of a bunch of code that's no longer necessary

* Fix linter

* Fix i18n

* Fix

* More fixing

* Updates

* Updates based on PR feedback

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-01-10 14:19:29 -05:00
Harrison Healey
978f335925
Improve Redux types part 1 (#25872)
* Always dispatch thunk actions instead of calling them

* Properly dispatch actions in SwitchChannelProvider

* Fix tests relying on bad types

* Properly pass actions into ManageTokens

* Make other logic changes to support new types

* Do the big type migrations without any logic changes

* Revert "Properly dispatch actions in SwitchChannelProvider"

This reverts commit 28c8c7af2e.

* Revert "Revert "Properly dispatch actions in SwitchChannelProvider""

This reverts commit 47115c5217.
2024-01-10 09:47:05 -05:00
Devin Binnie
0a4e9eeb92
[MM-56399][MM-56397][MM-56456][MM-56269] Various changes for user reporting for admins (#25839)
* [MM-56399] Add user count endpoint for reporting

* [MM-56397] Added search term to user report filter

* Missing translation

* [MM-56456] Rename up/down to prev/next for reporting cursoring

* [MM-56269] Add DeleteAt, MfaActive and AuthService fields to UserReport

* PR feedback

* Fix test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-01-10 09:08:23 -05:00
Ben Cooke
bb88b92b4c
[MM-53990] Support a global retention time of less than 1 day (#25196)
* adding new MessageRetentionHours config

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-01-09 14:10:22 -05:00
Scott Bishel
82b8d4dc07
MM-55966 - Update ArrayFromJSON to use LimitedReader (#25510)
* update ArrayFromJSON to use LimitedReader

* update for bad merge

* fix lint errors

* update test code

* update unit tests

* update unit tests

* fix unit tests

* use consts, other cleanup

* add non sorting duplicate check

* set config to default value, then config setting if available

* fix lint errors

* fixes and debugs

* fix log test

* remove setting from Client, add unlimited Parser to client

* a couple more fixes

* another fix

* rename some variables

* remove superflous call

* check for valid MaximumPayloadSize

* update language file

* fix for e2e-tests

* update util function to return error

* lint fix

* update config property name to include unit

* fix for unit test

* add new config to telemetry

* call function to create LimitedReader

* Deprecate old function, use new function name

* return new AppError on failed parse

* return new AppError on failed parse

* return new AppError on failed parse

* add constant for i18n valid constants

* Update server/public/model/utils_test.go

Co-authored-by: Miguel de la Cruz <mgdelacroix@gmail.com>

* Apply suggestions from code review

Co-authored-by: Miguel de la Cruz <mgdelacroix@gmail.com>

* update error variable, remove unnecessary check

* Update function names

* fix errors from merge

* update unit test to create unique ids

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Miguel de la Cruz <mgdelacroix@gmail.com>
2024-01-09 10:04:16 -07:00
Syed Ali Abbas Zaidi
4f0598d592
[MM-56296] Convert ./components/sidebar/sidebar_channel/sidebar_group_channel/sidebar_group_channel.tsx from Class Component to Function Component (#25768)
* [MM-56296] Convert `./components/sidebar/sidebar_channel/sidebar_group_channel/sidebar_group_channel.tsx` from Class Component to Function Component

* refactor: remove unnecessary callback
2024-01-09 15:24:43 +01:00
Thomas Brq
eca13a947b
Convert class to function component (#25769)
Co-authored-by: Mattermost Build <build@mattermost.com>
2024-01-09 15:24:12 +01:00
Jesús Espino
e959d9e4ea
Simplifying the channel_header component (#25795)
* Simplifying the channel_header component

* Addressing PR Review Comments

* Addressing PR Review Comments

* Addressing linter errors

* Fixing CI

* Fixing CI

* Addressing PR Review Comments
2024-01-09 13:05:50 +01:00
Doug Lauder
93351ff8a4
Fix error message when sharing already shared channel; also make idempotent (#25854)
* fix appError/error assignment bug

* make ShareChannel plugin API idempotent

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-01-09 12:42:11 +01:00
Doug Lauder
241e8edc2e
Ping new shared channels remotes immediately (#25850)
* option for auto inviting plugin to all shared channels.

* auto-invite remotes to shared channels when flag set

* fix unit test

* immediately ping new remotes; fix unique siteurl bug

* make i18n-extract

* fix translations

* fix merge conflicts

* make modules-tidy

* revert accidental go.mod change

* revert accidental go.sum changes

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-01-09 12:35:05 +01:00
Mario Vitale
43c3003e9d
CLD-6867 E2E Tests - Decouple cycle creation from test running (#25367)
* Separate test cycle generation from test running

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-01-09 11:40:33 +01:00
Doug Lauder
000aa0d891
Plugin API for Shared Channels: support auto invite (#25834)
* option for auto inviting plugin to all shared channels.

* auto-invite remotes to shared channels when flag set

* fix unit test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-01-08 18:12:18 +01:00
Jesse Hallam
b05093d508
Source available metrics (#24879)
* Expose metrics under a source available license

* do not assume Cluster()

* allow metrics if licensed or dev

* temporary vet override

* simplify BULID_TAGS handling

* auto clean old imports.go

* fix license listener

* e2e test metrics & license semantics

* update from enterprise

* switch back to mattermost-govet/v2@new now

* update metrics from upstream

* Update license_spec.js

Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>

* Update license_spec.js

Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>

* Update e2e-tests/cypress/tests/integration/channels/enterprise/metrics/license_spec.js

Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>

* Update e2e-tests/cypress/tests/integration/channels/enterprise/metrics/license_spec.js

* split up specs

* require/delete license earlier in e2e test

* expanded expect to debug failures

* more logging

* Revert "more logging"

This reverts commit 0bc513fd92.

* e2e: try deleting license first

* update from enterprise

* toggleMetricsOn to work around license delete

* eslint

* ensure admin before deleting license

* update from enterprise

* updates from enterprise

* fix cypress logging

* temp: log at DEBUG for Cypress tests

---------

Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2024-01-08 10:47:24 -04:00
Miguel de la Cruz
6184c36e0b
Fix make permission error (#25860) 2024-01-08 14:45:48 +01:00
Miguel de la Cruz
e1a27cf57f
Adds a team check to get groups by team (#25462)
* Adds a team check to get groups by team

* Update to take into account groups_by_channel and new permissions

* Update API docs
2024-01-08 13:28:51 +01:00
Syed Ali Abbas Zaidi
a1bdbe9875
[MM-56004] Convert ./components/post_view/new_message_separator/new_message_separator.tsx from Class Component to Function Component (#25647)
* [MM-56004] Convert `./components/post_view/new_message_separator/new_message_separator.tsx` from Class Component to Function Component

* refactor: update snapshot

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-01-08 11:13:56 +01:00
Nick Misasi
e52940cd08
Lock wrangler behind enterprise (#25703)
* Lock wrangler behind enterprise

* Run tests with SetupEnterprise so Thread Moving is unlocked. Tweak NewTestLicense to include a SkuShortName for 'enterprise'

* Don't set SkuShortName in NewTestLicense just in case. Fix up some old debug code in tests

* Remove checks on enterprise/e20 and just enforce that the workspace has any license

* Update admin_definition.tsx accordingly

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-01-05 13:20:37 -05:00
Devin Binnie
ac854498a4
[MM-56266] Check for public channels when getting channel member counts to avoid 403 errors (#25831)
* [MM-56266] Check for public channels when getting channel member counts to avoid 403 errors

* Fix test
2024-01-05 12:28:22 -05:00
Syed Ali Abbas Zaidi
d9c2a8825b
[MM-56290] Convert ./components/channel_header_dropdown/menu_items/toggle_favorite_channel/toggle_favorite_channel.tsx from Class Component to Function Component (#25762)
* [MM-56290] Convert `./components/channel_header_dropdown/menu_items/toggle_favorite_channel/toggle_favorite_channel.tsx` from Class Component to Function Component

* fix: update snapshots and check-types issue
2024-01-05 11:57:19 -05:00
Claudio Costa
077221a940
Revert "MM-55295: Improve DB performance of some APIs (#25318)" (#25852)
This reverts commit ec88ab4ee9.
2024-01-05 10:05:37 -06:00
M-ZubairAhmed
4b88bfd5fb
[MM-53149] White Screen when replying to a thread (#25818) 2024-01-05 06:47:23 +00:00
unified-ci-app[bot]
34e1692286
Update latest minor version to 9.5.0 (#25847)
Automatic Merge
2024-01-04 21:54:56 +02:00
Agniva De Sarker
ca94577cd5
MM-56260: connIndex: safely remove conns while iterating (#25785)
PR https://github.com/mattermost/mattermost/pull/22560
introduced a regression in the case where we had
multiple connections for a single user.

Because if connIndex.Remove was called during the iteration
from connIndex.ForUser, then the slice would be modified
during iteration and if a connection got removed,
then a good connection would move from the last index
to the current index. But since we would be actively
iterating, the last index would be read as nil and we would
never be able to reach the good connection.

We fix this by returning a copy of the original slice
if there are more than one elements in the slice.

https://mattermost.atlassian.net/browse/MM-56260
```release-note
Fix a bug where if there were multiple websocket
connections from a single user, then in case one connection
got removed during a broadcast, there was a possibility
that the other good connection might not get the event.
```
2024-01-04 13:36:22 -06:00
Harrison Healey
59549653a7
MM-56147 Add GetPreferenceForUser plugin API (#25704)
* MM-56147 Add GetPreferenceForUser plugin API

* Change return type to non-pointer for preference consistency

* Fix merge
2024-01-04 13:50:19 -05:00
Ben Schumacher
edc305716f
[MM-56284] Remove non-generic StoreResult (#25750) 2024-01-04 12:30:21 +01:00
Harrison Healey
502cd6ef7d
MM-56082 Add PreferencesHaveChanged plugin hook (#25659)
* Add interface for PreferencesHaveChanged hook

* Add context to preference-related methods of App

* Implement PreferencesHaveChanged

* Re-add missing "fmt" import

* Update minimum server version for the new hook

* Remove pointers to be consistent with other preference APIs
2024-01-03 12:25:53 -05:00
M-ZubairAhmed
18f0d8d88f
[MM-55407] Remove deprecated LocalizedIcon component (#25828) 2024-01-03 05:25:26 +00:00
Harshil Sharma
9016e30044
Fixed user reporting pagination (#25780)
* Fixed pagination and sorting for Postgres

* Updated tests
2024-01-02 10:41:00 -05:00
unified-ci-app[bot]
39b2ecf2dd
chore: Update NOTICE.txt file with updated dependencies (#25827)
Automatic Merge
2024-01-02 16:54:57 +02:00
M-ZubairAhmed
47bf846731
[MM-56387] Replace missed usage of LocalizedIcon in 'search_results_header.tsx' with i/span tags (#25826) 2024-01-02 10:36:33 +00:00
Sudhanva-Nadiger
64232a106e
[MM-47083] Migrate "components/pdf_preview.jsx" and tests to Typescript (#25211) 2024-01-02 10:33:42 +00:00
Kapil Dutta
b4ee90afca
[MM-55101] Replace usage of LocalizedIcon in 'multiselect.tsx' with i/span tags (#25665) 2024-01-01 12:12:03 +00:00
Sudhanva-Nadiger
ef0c5e2125
[MM-47086] Migrate "components/size_aware_image.jsx" and tests to Typescript (#25230) 2023-12-30 12:52:27 +00:00
Angel Mendez
fb1038548e
[MM-47961] Migrate /support/assertions.js e2e tests file to TypeScript (#25731) 2023-12-29 07:47:39 +00:00