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

14862 Коммитов

Автор SHA1 Сообщение Дата
Alejandro García Montoro
e08324596b Bump pre-packaged version of Zoom to v1.6.0 (#20370) 2022-06-07 15:27:13 +02:00
Ibrahim Serdar Acikgoz
c1c084a596 app/plugin: add product middleware and enable products register their routers (#20374) 2022-06-07 09:12:15 +03:00
Scott Bishel
2580722426 update boards to v7.0.0 (#20371) 2022-06-06 14:55:16 -06:00
Vishal
27fc14201f [MM-42192] Include deleted posts in GetPost (#20358)
* Introduced include_deleted query param on get posts endpoint

* Update the correct func name in the comment.

Co-authored-by: santoniriccardo <santoni.riccardo@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-06 13:29:42 +05:30
Ashish Bhate
456299841a MM-44412: correct usage of updateAt to createAt (#20263)
* MM-44412: correct usage of updateAt to createAt

* lint

* correct usage of updateAt to createAt - CRT unsupported

* remove dead code

* remove unrequired tests

* update test name

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-03 12:26:36 -04:00
Michael Kochell
7833e595aa [MM-44604] Ensure we return after setting error in api4/config.go (#20294) 2022-06-03 10:14:56 -04:00
Daniel Schalla
182536b87d Fix Trusted Header Parsing for Cloudflare (#20359) 2022-06-03 15:46:02 +02:00
Tim Scheuermann
19098e93fc [MM-42878] Allow + in the timestamp for mlog tests (#20360) 2022-06-03 15:39:03 +02:00
Tim Scheuermann
f836826c1d [MM-44329] Add a method to store.Store interface to get sql.DB object (#20351)
* [MM-44329] Added methods to sqlstore.Store

* [MM-44329] Added methods to the store.Store interface

* [MM-44329] Regenerated mocks

* [MM-44329] Added comments for the store.Store interface

Co-authored-by: Tim Scheuermann <tim.scheuermann@mattermost.com>
2022-06-03 11:11:23 +02:00
Ashish Bhate
8f912b697e MM-43918: freemium limit for storage (#20225)
Summary
Adds an API end point to return storage usage

Ticket Link
https://mattermost.atlassian.net/browse/MM-43918
2022-06-03 11:48:29 +05:30
Ashish Bhate
1f6e2fe846 MM-41728: Validate emoji size in app while importing (#20325)
* MM-41728: Validate emoji size in app on import

* use NotNil instead of Error for AppErr

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-02 23:55:40 -04:00
Lev
c975fdc982 Bumped prepackaged mattermost-plugin-apps to v1.1.0 (#20276)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-02 13:51:14 -07:00
Agniva De Sarker
ec0284b459 MM-44638: Remove upgrade.go (#20309)
We remove any remaining migrations from the upgrade.go file

```release-note
NONE
```
2022-06-02 22:53:12 +05:30
Pablo Andrés Vélez Vidal
c92cbb606a MM-44420 - replace 14-day references with new freemium 30-day (#20349)
Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
2022-06-02 18:25:19 +02:00
Nick Misasi
f42702e13e Add StatusOK return to the softDeleteTeamsExcept controller (#20340)
* Prevent cloud limited installations from restoring teams when at or above the teams limit

* Code clean up

* fix i18n

* Actually fix i18n

* updates for govet

* Update model/client4.go

Co-authored-by: Vishal <vish9812@gmail.com>

* [MM-44397] Restrict team creation based on subscription limits (#20282)

* restrict team creation based on limits

* Update api4/team.go

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

* Fix tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>

* Add additional field to teamsusage

* Fix

* remove useless test

* Fix error for team creation

* Remove apostrophe

* Add ReturnStatusOK to softDeleteTeamsExcept

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Vishal <vish9812@gmail.com>
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
2022-06-02 09:02:41 -04:00
Pablo Andrés Vélez Vidal
d5333603ab MM 43666 - request bussiness email (#20315)
* MM-43666 - request bussiness email

* add the newValidEmail information

* revert ff model changes

* remove unnecessary pointer and fix test spelling

* fix unit tests and add a new one for when passing a valid email

* fix go lint

Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-01 23:36:03 +02:00
master7
24d9210035 Translated using Weblate (Polish)
Currently translated at 100.0% (2330 of 2330 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/
2022-06-01 09:20:34 +02:00
Hosted Weblate
622cee9b44 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/
2022-06-01 09:20:34 +02:00
Matthew Williams
0d20c4cf9c Translated using Weblate (English (Australia))
Currently translated at 99.3% (2315 of 2331 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/
2022-06-01 09:20:34 +02:00
Kaya Zeren
4e408b484c Translated using Weblate (Turkish)
Currently translated at 100.0% (2331 of 2331 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/
2022-06-01 09:20:34 +02:00
jprusch
84b488abab Translated using Weblate (German)
Currently translated at 100.0% (2331 of 2331 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/
2022-06-01 09:20:34 +02:00
Tom De Moor
98817808f4 Deleted translation using Weblate (Macedonian) 2022-06-01 09:20:34 +02:00
Weblate
f1c9bec83b Added translation using Weblate (Macedonian) 2022-06-01 09:20:34 +02:00
Ibrahim Serdar Acikgoz
fe3816cc20 store: guests will only receive results of which channels they are in (#20295)
* store: guests will only receive results of which channels they are in

* api4/channel_test: add test case for guest accounts channel autocomplete

* apply to searchengine and also for AutocompleteInTeam

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-01 09:18:59 +03:00
Nick Misasi
cffe921e62 [MM-44475] Team Unarchive: Do not allow to unarchive if workspace has reached the limit of teams (#20281)
* Prevent cloud limited installations from restoring teams when at or above the teams limit

* Code clean up

* fix i18n

* Actually fix i18n

* updates for govet

* Update model/client4.go

Co-authored-by: Vishal <vish9812@gmail.com>

* [MM-44397] Restrict team creation based on subscription limits (#20282)

* restrict team creation based on limits

* Update api4/team.go

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

* Fix tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>

* Add additional field to teamsusage

* Fix

* remove useless test

* Fix error for team creation

* Remove apostrophe

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Vishal <vish9812@gmail.com>
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
2022-05-31 15:06:54 -04:00
Martin Kraft
287edba57a MM-44130: Changed email button text. (#20288) 2022-05-31 13:57:34 -04:00
Joram Wilander
8b1a6ef238 Remove NextSyncAt from GetRemoteStatus query (#20312) 2022-05-31 11:03:10 -04:00
Ibrahim Serdar Acikgoz
a18934b042 config/diff: add utility function to get diffs scoped with struct tags (#20297)
* config/diff: add utility function to get diffs scoped with struct tags

* api4/config.go: check cloud accessible settings after merge
2022-05-31 17:10:32 +03:00
Vishal
d87fe35bdf [MM-44263] Cache Posts Usage (#20254)
* Fetch users only posts

* Cache Posts Usage

* Explicitly validate posts count before testing usage

* Add DocString

* Revert cache changes

* Revert "Revert cache changes"

This reverts commit ba693f8d5028b62c19f6a730e8dca73a224d0761.
2022-05-31 16:25:46 +05:30
Vishal
57e9aa767c [MM-44263] Only include user posts in post count (#20250)
* Fetch users only posts

* Explicitly validate posts count before testing usage
2022-05-31 14:18:41 +05:30
Ibrahim Serdar Acikgoz
70610a9c96 app/server: add userservice to the service map (#20296) 2022-05-27 14:40:24 +03:00
Vishal
8e12d81f16 [MM-33123] Add a test for SetPostUnread-DM Channel (#20129)
* Add a test for SetPostUnread-DM Channel

* assert early

* Unread post in DM thread

* Replace th.BasicUser with u1 var

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-27 15:53:37 +05:30
Ashish Bhate
c5e6d0e1ba MM-43878: don't err when reply createAt before parent createAt (#20292)
Summary
In a bulk import, if the createAt of a reply is older than the createAt of the parent post, then instead of erroring, we log a warning and set the createAt of the reply to that of the parent post.
I checked the exporting logic, there doesn't appear to be away for the reply createAt to be older than the parent createAt, as a side-effect of the exporting logic.

Ticket Link
https://mattermost.atlassian.net/browse/MM-43878
2022-05-27 15:48:00 +05:30
Agniva De Sarker
84dbf894ea Added index on SidebarCategories table (#20045)
```release-note
NONE
```


Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-27 01:14:18 +05:30
Christopher Speller
e284b811df Add subresource integrety (#20257) 2022-05-26 10:54:11 -07:00
Kyriakos Z
3391adb67b MM-44568: sanitizes profiles in posts (#20291)
* MM-44568: sanitizes profiles in posts

* Fixes tests

* Adds test

* Satisfy vet
2022-05-26 15:41:06 +03:00
Ibrahim Serdar Acikgoz
9985e22dab app: add permissions wrapper (#20242) 2022-05-26 14:03:47 +03:00
Agniva De Sarker
0dd1969bd5 MM-31396: Attempt to fix deadlock while updating sidebar categories (#20215)
A deadlock that has been found on our Community servers is:

```
------------------------
LATEST DETECTED DEADLOCK
------------------------
2022-03-03 06:14:37 0x2aec58887700
*** (1) TRANSACTION:
TRANSACTION 1043681684, ACTIVE 0 sec starting index read
mysql tables in use 1, locked 1
LOCK WAIT 23 lock struct(s), heap size 1136, 137 row lock(s), undo log entries 26
MySQL thread id 448011, OS thread handle 47195956565760, query id 752406931 10.128.147.211 mmcloud updating
DELETE FROM SidebarChannels WHERE ((ChannelId IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) OR ChannelId IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)) AND CategoryId = ?)
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 907 page no 368 n bits 0 index PRIMARY of table `mattermost`.`SidebarChannels` trx id 1043681684 lock_mode X waiting
Record lock, heap no 121 PHYSICAL RECORD: n_fields 6; compact format; info bits 0
 0: len=26; bufptr=0x2aebbd36b75c; hex= 3363776f6a6a6d36316a62663967657036706872316533696a77; asc 3cwojjm61jbf9gep6phr1e3ijw;;
 1: len=26; bufptr=0x2aebbd36b776; hex= 3568616279726d36746a6265747061656538786973786d6b7177; asc 5habyrm6tjbetpaee8xisxmkqw;;
 2: len=26; bufptr=0x2aebbd36b790; hex= 373568726a7a68676169726370653477696877727866716f7463; asc 75hrjzhgaircpe4wihwrxfqotc;;
 3: len=6; bufptr=0x2aebbd36b7aa; hex= 00003e355176; asc   >5Qv;;
 4: len=7; bufptr=0x2aebbd36b7b0; hex= 39000352420fce; asc 9  RB  ;;
 5: len=8; bufptr=0x2aebbd36b7b7; hex= 80000000000000fa; asc         ;;

*** (2) TRANSACTION:
TRANSACTION 1043681679, ACTIVE 0 sec starting index read
mysql tables in use 1, locked 1
LOCK WAIT 76 lock struct(s), heap size 1136, 294 row lock(s), undo log entries 72
MySQL thread id 447990, OS thread handle 47194812454656, query id 752406930 10.128.147.211 mmcloud updating
DELETE FROM SidebarChannels WHERE ((ChannelId IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) OR ChannelId IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)) AND CategoryId = ?)
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 907 page no 368 n bits 0 index PRIMARY of table `mattermost`.`SidebarChannels` trx id 1043681679 lock_mode X
Record lock, heap no 121 PHYSICAL RECORD: n_fields 6; compact format; info bits 0
 0: len=26; bufptr=0x2aebbd36b75c; hex= 3363776f6a6a6d36316a62663967657036706872316533696a77; asc 3cwojjm61jbf9gep6phr1e3ijw;;
 1: len=26; bufptr=0x2aebbd36b776; hex= 3568616279726d36746a6265747061656538786973786d6b7177; asc 5habyrm6tjbetpaee8xisxmkqw;;
 2: len=26; bufptr=0x2aebbd36b790; hex= 373568726a7a68676169726370653477696877727866716f7463; asc 75hrjzhgaircpe4wihwrxfqotc;;
 3: len=6; bufptr=0x2aebbd36b7aa; hex= 00003e355176; asc   >5Qv;;
 4: len=7; bufptr=0x2aebbd36b7b0; hex= 39000352420fce; asc 9  RB  ;;
 5: len=8; bufptr=0x2aebbd36b7b7; hex= 80000000000000fa; asc         ;;

[bitmap of 256 bytes in hex: 00 00 00 00 00 00 00 f0 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 907 page no 67 n bits 0 index PRIMARY of table `mattermost`.`SidebarChannels` trx id 1043681679 lock_mode X waiting
Record lock, heap no 103 PHYSICAL RECORD: n_fields 6; compact format; info bits 0
 0: len=26; bufptr=0x2aeb4515ec1b; hex= 6431376b35706f71786979776d6b6d616b6a78623539356b366f; asc d17k5poqxiywmkmakjxb595k6o;;
 1: len=26; bufptr=0x2aeb4515ec35; hex= 7067653939686a356562676b38636f6f70637a6e7871677a6568; asc pge99hj5ebgk8coopcznxqgzeh;;
 2: len=26; bufptr=0x2aeb4515ec4f; hex= 336e3731636a73656f667931397267746664337962786d713777; asc 3n71cjseofy19rgtfd3ybxmq7w;;
 3: len=6; bufptr=0x2aeb4515ec69; hex= 00003e34fa4d; asc   >4 M;;
 4: len=7; bufptr=0x2aeb4515ec6f; hex= 4600026d940e4c; asc F  m  L;;
 5: len=8; bufptr=0x2aeb4515ec76; hex= 8000000000000082; asc         ;;

*** WE ROLL BACK TRANSACTION (1)
```

It seems like 2 DELETE queries are somehow deadlocking on the same row.

On looking at it deeply, we can see that in an updateSidebarCategory scenario,
we run 2 delete queries in a single transaction. In that delete query, we not only delete the existing channels for a category,
but also delete the new channels that are going to be inserted in the new category.

The potential issue with this is that since we are updating both the source and destination category in a single transaction,
the category which is moved appears in the destination section for the first category, and in the source section for the second category.
Which means in a single transaction, you have 2 queries possibly interlocking due to the same channels.

Therefore, if we run 2 separate updateCategories with an inverted order of categories, then the same set of delete queries
can lock on the opposite order of channels and cause a deadlock.

I haven't been able to reproduce this, but just a hunch. And in any case, this will reduce the number of DB updates.

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-26 14:44:55 +05:30
Ashish Bhate
2315fcf05b MM-43780: Adjust getPostThread API for easier pagination (#20172)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-25 18:18:05 -04:00
Alejandro García Montoro
b10ff1b1f7 MM-44221: Add admin console setting to enable/disable App Bar (#20224)
* Revert "[MM-39820] Add AppBarEnabled feature flag (#18967)"

This reverts commit ba1b279c5f.

* Add EnableAppBar admin setting

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-25 22:53:51 +02:00
Michael Kochell
ea5bfe3fd9 Cloud Freemium - Integrations (#20185)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-25 12:36:08 -04:00
Christopher Poile
54a88fb532 prepackage calls 0.5.3 (#20286) 2022-05-24 16:50:53 -04:00
Ashish Bhate
ac34a94155 fix conflict in migration numbers (#20275) 2022-05-24 19:29:52 +02:00
Nick Misasi
50d069e86d [MM-44307] On Limits Change, archive or restore teams according to the limits (#20247)
Automatic Merge
2022-05-24 16:16:24 +03:00
master7
380a0ef827 Translated using Weblate (Polish)
Currently translated at 100.0% (2330 of 2330 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/
2022-05-23 18:43:19 +02:00
kaakaa
ebe1efc757 Translated using Weblate (Japanese)
Currently translated at 100.0% (2330 of 2330 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/
2022-05-23 18:43:19 +02:00
Matthew Williams
32e91e6a44 Translated using Weblate (English (Australia))
Currently translated at 99.3% (2314 of 2330 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/
2022-05-23 18:43:19 +02:00
Tóth Csaba // Online ERP Hungary Kft
eae40785a4 Translated using Weblate (Hungarian)
Currently translated at 99.5% (2320 of 2330 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/
2022-05-23 18:43:19 +02:00
MArtin Johnson
959816f748 Translated using Weblate (Swedish)
Currently translated at 100.0% (2330 of 2330 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/
2022-05-23 18:43:19 +02:00
Kaya Zeren
ef4087e44c Translated using Weblate (Turkish)
Currently translated at 100.0% (2330 of 2330 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

Translated using Weblate (Turkish)

Currently translated at 100.0% (2330 of 2330 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

Translated using Weblate (Turkish)

Currently translated at 99.9% (2328 of 2330 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/
2022-05-23 18:43:19 +02:00