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

14235 Коммитов

Автор SHA1 Сообщение Дата
Ibrahim Serdar Acikgoz
ca02fabb91 allow upsert for duplicate key 2021-12-17 11:39:25 +03:00
Allan Guwatudde
0b1e9445c8 [MM-40682] - SIGSEGV after upgrade from 6.1.0 to 6.2.0 (#19192)
* [MM-40682] - SIGSEGV after upgrade from 6.1.0 to 6.2.0

* feedback impl
2021-12-17 09:39:10 +03:00
Carlos Tadeu Panato Junior
36008ae412 fix mmctl download script when using as stand alone script (#19143) 2021-12-16 11:31:57 +01:00
Agniva De Sarker
e4ef39d68f Remove unnecessary test TestValidateToken (#19177)
The TestValidateToken was actually testing
the underlying library rather than testing our code.
So, in a way, it was ineffective.

The actual flaky test was that in a rare care,
the random string generated might actually lead
to 000000 being an actual code rather than invalid.

So using random strings is fundamentally incorrect.
Even the tests in the library use hardcoded strings
and not random strings.

To fix this properly would be to use hardcoded strings,
but then we would just be testing the library
and not our code. To keep things simple,
we just keep the test to verify the error message
and remove the others.

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4/cidjhgy1ag3yktn5eszae1489yr

```release-note
NONE
```
2021-12-15 23:01:32 +05:30
Allan Guwatudde
5aba3bb9e2 Improve gif processing (#19164)
* Improve gif processing

* feedback impl
2021-12-15 19:07:24 +03:00
Ujjwal Sharma
1fc8a2ea20 [MM-39640] Migrate from gorp to sqlx in store/sqlstore/role_store.go (#19022)
Automatic Merge
2021-12-15 17:40:31 +02:00
Maksim Matveev
3d412b14af Translated using Weblate (Russian)
Currently translated at 96.0% (2233 of 2325 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ru/
2021-12-13 11:57:11 -06:00
Tom De Moor
d71e9808fd Translated using Weblate (Dutch)
Currently translated at 100.0% (2325 of 2325 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/
2021-12-13 11:57:11 -06:00
Kaya Zeren
c692135802 Translated using Weblate (Turkish)
Currently translated at 100.0% (2325 of 2325 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/
2021-12-13 11:57:11 -06:00
Scott Bishel
2727bb122e prepackage boards to v0.10.0 (#19111)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-12-13 14:33:48 +01:00
Yair Facio
3b3ab701b1 [MM-39231] Migrate license store from gorp to sqlx in store/sqlstore/license_store.go (#19146)
Automatic Merge
2021-12-12 08:10:31 +02:00
Yair Facio
62d4d8166d [MM-39636] Migrate from gorp to sqlx in store/sqlstore/retention_policy_store.go (#18994)
* Migrate Save from gorp to sqlx

* Migrate checkTeamsExist from gorp to sqlx

* Migrate checkChannelsExist from gorp to sqlx

* Migrate Patch from gorp to sqlx

* Migrate buildGetPoliciesQuery from gorp to sqlx

* Migrate Get from gorp to sqlx

* Change buildGetPolicyQuery return values

* Migrate GetAll from gorp to sqlx

* Migrate GetCount from gorp to sqlx

* Migrate Delete from gorp to sqlx

* Migrate GetChannels from gorp to sqlx

* Migrate GetChannelsCount from gorp to sqlx

* Migrate AddChannels from gorp to sqlx

* Migrate RemoveChannels from gorp to sqlx

* Migrate GetTeams from gorp to sqlx

* Migrate GetTeamsCount from gorp to sqlx

* Migrate AddTeams from gorp to sqlx

* Migrate RemoveTeams from gorp to sqlx

* Migrate DeleteOrphanedRows from gorp to sqlx

* Migrate GetTeamPoliciesForUser from gorp to sqlx

* Migrate GetTeamPoliciesCountForUser from gorp to sqlx

* Migrate GetChannelPoliciesForUser from gorp to sqlx

* Migrate GetChannelPoliciesCountForUser from gorp to sqlx

* Migrate Delete from gorp to sqlx

* Add mapper tag function before saving a record

Summary:
Since there is a db tag in this model for the ID column,
I set a mapper in this transaction to lowercase
all mapping columns before saving the record.

* Use quoted identifiers when selecting Id

* Address PR comments, replace variable declarations for their short hand syntax

* Enhance subquery implementation

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-12-10 14:57:24 +05:30
Yair Facio
fa38202d98 [MM-39636] Migrate from gorp to sqlx in store/sqlstore/product_notices_store.go (#19012)
* Migrate from gorp to sqlx in ProductNoticesStore

* Address PR comments

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-12-10 14:48:46 +05:30
Agniva De Sarker
0e00afd65f MM-40469: Handle invalid response codes from plugins (#19136)
* MM-40469: Handle invalid response codes from plugins

This was an interesting crash detected via Sentry.

Typically, any HTTP status code outside 100-999 range
will cause a crash in the HTTP server. And `ExecuteCommand`
is the only plugin hook which returns a model.AppError
instead of error.

So an incorrect plugin implementation could return
a status code of 0, and crash the server. We handle that
by rewriting any illegal response code to 500.

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

```release-note
NONE
```

* added warning

```release-note
NONE
```
2021-12-09 14:17:41 +05:30
Ben Schumacher
052d99c362 Remove dead struct ManifestExecutables (#19122) 2021-12-09 09:22:43 +01:00
Jesse Hallam
92e80bd4ed Pre-package Playbooks v1.22.1 (#19130)
* Pre-package Playbooks v1.22.1

* Bump
2021-12-07 14:56:52 -04:00
Christopher Speller
5ec78546e2 MM-38150 Adding playbooks permissions (#19096)
* Add playbooks related permissions.

* Add RolesGrantPermission to pluginapi

* Fixing scopes.

* New defaults.

* Fix defaults

* Fix tests.

* Fix migration.

* More test and migration fixes.

* Need to add everything to system admin too.

* Move to 63

* Feedback fixes.

* Fix system manager editing playbook permissions.
2021-12-07 09:43:33 -08:00
Agniva De Sarker
129f0aabd3 Remove the remaining fields from *app.Server (#19113)
We move these fields to Channels:
```
uploadLockMapMut sync.Mutex
uploadLockMap    map[string]bool
imgDecoder *imaging.Decoder
imgEncoder *imaging.Encoder
dndTaskMut sync.Mutex
dndTask    *model.ScheduledTask
```

I think this PR should conclue the initial phase
of migrating stuff from Server to Channels.

The remaining task would be to focus on continue
to create the remaining services from the
common things like users, teams, push notifications,
clustering for other products to consume.

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4/87df1e15-588e-49ff-8bd1-ffa9651b8c82

```release-note
NONE
```
2021-12-07 21:53:24 +05:30
Claudio Costa
6d361db638 [MM-40485] Enable receiving binary websocket messages (#19128)
* Enable receiving binary websocket messages

* Improve error message

* Prefer anonymous declaration

* Simplify

* Improve test

* Use MessagePack to clone WebSocketRequest struct

* Use short form

* Fix test
2021-12-07 15:24:18 +01:00
kaakaa
64fb04a9e9 Translated using Weblate (Japanese)
Currently translated at 100.0% (2325 of 2325 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/
2021-12-06 14:07:54 -05:00
MArtin Johnson
797007d639 Translated using Weblate (Swedish)
Currently translated at 100.0% (2325 of 2325 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/
2021-12-06 14:07:54 -05:00
Tóth Csaba // Online ERP Hungary Kft
3c26721236 Translated using Weblate (Hungarian)
Currently translated at 100.0% (2325 of 2325 strings)

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

Translated using Weblate (Hungarian)

Currently translated at 100.0% (2325 of 2325 strings)

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

Translated using Weblate (Hungarian)

Currently translated at 100.0% (2325 of 2325 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/
2021-12-06 14:07:54 -05:00
gruceqq
862b6da8d7 Translated using Weblate (Polish)
Currently translated at 100.0% (2325 of 2325 strings)

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

Translated using Weblate (Polish)

Currently translated at 100.0% (2325 of 2325 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/
2021-12-06 14:07:54 -05:00
Matthew Williams
7ea273cf05 Translated using Weblate (English (Australia))
Currently translated at 100.0% (2325 of 2325 strings)

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

Translated using Weblate (English (Australia))

Currently translated at 100.0% (2325 of 2325 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/
2021-12-06 14:07:54 -05:00
master7
15bf9c1da0 Translated using Weblate (Polish)
Currently translated at 100.0% (2325 of 2325 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/
2021-12-06 14:07:54 -05:00
JtheBAB
199c212759 Translated using Weblate (German)
Currently translated at 100.0% (2325 of 2325 strings)

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

Translated using Weblate (German)

Currently translated at 100.0% (2325 of 2325 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/
2021-12-06 14:07:54 -05:00
Tom De Moor
5a8173602d Translated using Weblate (Dutch)
Currently translated at 100.0% (2325 of 2325 strings)

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

Translated using Weblate (Dutch)

Currently translated at 100.0% (2325 of 2325 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/
2021-12-06 14:07:54 -05:00
Kyriakos Z
36c8d1d1a0 MM-36862: removes participant from thread (#18795)
* MM-36862: removes participant from thread

Removing a participant upon last reply deleted from thread didn't work
reliably, a suspect on this is the replica lag, since we are first
deleting the post and then counting non-deleted posts of the participant
to decide on whether to delete or not.

The findings that led to this conclusion is that the reply count gets
updated but the participant is not removed (participant removal depends
on the number of replies this participant has in the thread.)

This commit fixes that by removing first the participant and then
deleting the post.
So we delete the participant if they have 1 post in that thread, and
then we delete the post, so now they have no posts in the thread.

* Makes deleting posts transactional

This commit makes deleting a post transactional and also tries to fix
permanent deletion of posts.

Currently when we permanently delete all posts by a user we don't update
the threads reply count nor the participant's array. This commit tries
to fix that.

* Adds comments on deleting posts

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-12-06 12:01:04 +02:00
Carrie Warner (Mattermost)
d53cffc518 Merge pull request #18917 from mattermost/terminology-update
Updated Account Settings to Settings
2021-12-03 10:20:06 -05:00
Carrie Warner (Mattermost)
243a066554 Merge pull request #19043 from mattermost/tos-tou
Updated Terms of Service to Terms of Use
2021-12-03 10:19:29 -05:00
Agniva De Sarker
34db2e92cc Remove reliable websockets configuration (#19040)
The feature is stable enough to be removed
as a config knob.

For backwards compatiblity with older mobile
clients, we keep sending the config param
as true for client config requests.

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4/7m95frqbk9o8zxin6xo9c7iusoh

```release-note
NONE
```
2021-12-03 20:29:57 +05:30
Carlos Tadeu Panato Junior
c317254954 build: add mmctl to arm64 packages (#19090)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-12-03 15:37:37 +01:00
Agniva De Sarker
6a7067e4b6 Clarify comment on golang-migrate connection (#19104)
The old comment wasn't exactly clear on
why is it needed to spawn a new connection.

```release-note
NONE
```
2021-12-03 14:15:43 +01:00
Pablo Andrés Vélez Vidal
8a62bfaa65 MM-38674 - AB test for first guided channel creation (#18885)
* MM-38674 - AB test for first guided channel creation

* set default value for the guided creation as false

Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
2021-12-02 14:42:08 +01:00
Pablo Andrés Vélez Vidal
c96bb583e7 MM-40222 - show gov references in license page when gov license (#19100)
Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
2021-12-01 18:45:33 +01:00
Allan Guwatudde
22af6f72be [MM-40395] - Text Changes in Congratulations email after trial signup (#19114) 2021-12-01 18:27:57 +03:00
Allan Guwatudde
a7c6fa1340 [MM-40345] - Fix telemetry in resend invite email job (#19049)
* [MM-40345] - Fix telemetry in resend invite email job

* feedback impl
2021-11-30 18:42:33 +03:00
Agniva De Sarker
9fde5aa5e2 Do not parse developer flags if empty (#19097)
* Do not parse developer flags if empty

Attempting to parse an empty flag would
result in a spurious log line which would
clog up the console.

```release-note
NONE
```

* add test

```release-note
NONE
```
2021-11-30 14:27:25 +05:30
Matthew Williams
f075690195 Translated using Weblate (English (Australia))
Currently translated at 100.0% (2325 of 2325 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/
2021-11-29 23:59:42 -05:00
MArtin Johnson
6de0559669 Translated using Weblate (Swedish)
Currently translated at 100.0% (2325 of 2325 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/
2021-11-29 23:59:42 -05:00
master7
54866a0690 Translated using Weblate (Polish)
Currently translated at 100.0% (2325 of 2325 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/
2021-11-29 23:59:42 -05:00
Tóth Csaba // Online ERP Hungary Kft
1021c46d78 Translated using Weblate (Hungarian)
Currently translated at 100.0% (2325 of 2325 strings)

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

Translated using Weblate (Hungarian)

Currently translated at 100.0% (2324 of 2324 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/
2021-11-29 23:59:42 -05:00
gruceqq
a0cac222d4 Translated using Weblate (Polish)
Currently translated at 100.0% (2324 of 2324 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/
2021-11-29 23:59:42 -05:00
Tom De Moor
2a40dd9b33 Translated using Weblate (Dutch)
Currently translated at 100.0% (2324 of 2324 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/
2021-11-29 23:59:42 -05:00
jprusch
7a463257f9 Translated using Weblate (German)
Currently translated at 100.0% (2325 of 2325 strings)

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

Translated using Weblate (German)

Currently translated at 100.0% (2324 of 2324 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/
2021-11-29 23:59:42 -05:00
Martin Kraft
7b28367928 MM-39433: Fixes (*App).getEmbedsAndImages parameter. (#19103) 2021-11-29 19:56:15 -05:00
Igor German
d3536087d7 Make getPrepackaged resilient to missing plugin icons (#18505)
Signed-off-by: Igor German <germanenak@gmail.com>

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-11-29 14:17:59 -04:00
Ben Cooke
27dacb82ce [MM-38239 & MM-39788] Recent files causing crash (#18942)
* wip

* adding tests for new endpoint

* tool updates

* new function for getting postsByIds

* fixing test

* adding limit of 1000 to post query

* fixing PR comments

* fixing permission logic

Co-authored-by: Collin <collineng@gmail.com>
Co-authored-by: Collin Eng <eng.engineereng@gmail.com>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.ht.home>
2021-11-26 11:51:32 -05:00
Carlos Tadeu Panato Junior
44d324a45f prepera db upgrade to 6.3 (#19086) 2021-11-26 16:51:25 +01:00
Carlos Tadeu Panato Junior
810edf34a1 upgrade db to 6.2.0 (#19085) 2021-11-26 15:50:09 +01:00