Commit Graph

12631 Commits

Author SHA1 Message Date
Joshua Bezaleel Abednego
4ba6c35813 [MM-24664] Plugin_store queries squirrel refactor (#14523)
* Use squirrel to build query for plugin store

* Typo of PluginkeyValueStore to PluginKeyValueStore

* wrong parameter of queryBuilder in Get method

* Use casting to int for comparison on ExpireAt

* Revert query for CompareAndSet and CompareAndDelete temporarily

* Delete query of expired value

* Update query when oldValue is not nil

* Check count query when there is no row affected

* Delete query on CompareAndDelete

* Put squirrel in separate import group

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
2020-07-15 22:22:35 +05:30
Rodrigo Villablanca
87dfbc13c0 SessionStore migration (#15002)
* Finished

* Fiximports

* Fix i18n
2020-07-15 18:56:28 +05:30
Eli Yukelzon
b15c0484c6 MM-26834 - Move opentracing into a separate package (#15011) 2020-07-15 12:59:11 +03:00
Agniva De Sarker
ef63afac21 MM-26675/26676: Add missing translation strings (#14963)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-07-15 12:54:29 +05:30
Mario de Frutos Dieguez
6107660483 [MM-24088] Use Raw SQL query for PluginStore.Get instead of GORP (#14650)
* Use Raw SQL query instead of GORP

As part of performance improvements we're moving the top
used queries to avoid using gorp and get rid of the overhead
caused by the reflection usage
2020-07-15 09:19:51 +02:00
Ibrahim Serdar Acikgoz
ec78168242 [MM-25651] api4/ldap: add migrateid (#14794)
* api4/ldap: add idmigrate

* api4/ldap: add migrateid to local api

* api4/ldap: improve migrate test

* api4/ldap: add licence check
2020-07-14 15:59:35 +03:00
Jesús Espino
e980dd7bd3 Configurable dev environment (#14869)
* Configurable dev environment

* Add a bit of documentation

* fixing gofmt

* A bit more doc

* Using  variable

* Adding license header

* Moving LDAP_DATA variable to the default-config.mk file

* Adding another docker-compose for the makefile to not brake anybody workflow

* Moving dejavu to the config

* Fixing docker-compose.makefile.yaml for dejavu

* Adding keycloak support to the dev environment

* Address PR review comments

* Removing minio from default docker images

* Changing the default version of mysql to the oldest supported (5.6)

* Change the restart option to no for the dev environment

* Fixing restart option

* Reverting unneded changes

* Restoring 5.7 to check if test passes

* Going back to 5.6 mysql image

* Fixing tests on mysql 5.6

* Skipping flaky test

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-07-13 22:29:39 +02:00
dantepippi
6ad5ef2b43 [MM-24944] Refactor command store to use squirrel (#14552)
Automatic Merge
2020-07-13 21:26:07 +02:00
Agniva De Sarker
94827d06a3 MM-26750: Remove instances of InitBasic when it's not required (#14984)
th.InitBasic initializes users, channels, and teams. But a lot of
tests don't use it at all, causing unncessary delays. A single InitBasic
call takes around 400ms. This PR removes 71 of them, approximately shaving
off 28 seconds. Arguably, this would be more because some tests run in loops.
2020-07-13 19:34:05 +02:00
Farhan Munshi
da95d40e33 Always clear channel cache when scheme is deleted (#14989) 2020-07-10 00:09:00 -04:00
Rodrigo Villablanca
3c2b1571f4 Prevent spurious error (#14796)
* Simple fix

* Suggestions

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-07-09 13:25:23 -03:00
Harrison Healey
b0b9c707a6 MM-26793 Fix accidentally removing other users' favorites again (#14995) 2020-07-09 11:08:08 -04:00
Rodrigo Villablanca
1302492874 ClusterDiscoveryStore migration (#14970)
Automatic Merge
2020-07-09 15:24:11 +02:00
Sudheer
50fd95717e MM-26620 Add a config setting for controlling ask community link (#14985)
* MM-26620 Add a config setting for controlling ask community link

* Update setting

* Change to support setting
2020-07-09 17:59:22 +05:30
Rodrigo Villablanca
8b6a5fc5d7 TokenStore migration to return plain errors (#14875)
* TokenStore migration to return plain errors

* Fix translations

* Fix: returned error is ignored and http.StatusBadRequest is always returned

* Fix

* Fix translations

* Suggestions

* Changed from BadRequest to NotFound

* Setting the correct http status

* Changed test to expect 404 status

* Fix error
2020-07-09 12:46:27 +05:30
Mario de Frutos Dieguez
4df6019f61 [MM-24089] Remove use of Gorp in ChannelStore.GetAllChannelMembersForUser (#14663)
* Remove use of Gorp in ChannelStore.GetAllChannelMembersForUser

In order to improve performance, we're removing gorp calls in the
most used queries in the platform and this is one of them
2020-07-09 09:13:17 +02:00
Harrison Healey
7910e237b9 MM-26793 Fix accidentally removing other users' favorites (#14988) 2020-07-08 15:30:20 -04:00
Harrison Healey
302e59a0fe MM-26753 Create initial sidebar categories on demand if migration hasn't ran (#14981)
* MM-26753 Change CreateInitialSidebarCategories to only take a user ID

* MM-26753 Create initial sidebar categories on demand if migration hasn't ran

* Wait for sidebar categories to be loaded in case of replication lag
2020-07-08 12:07:42 -04:00
Farhan Munshi
31200fc657 [MM-26541] Parse channel member counts using LIKE instead of using JSON (#14941)
* MM-26541 parse channel member counts using like instead of using JSON as mysql versions do not support json extract

* Use a constant for default timezone

* Update wording and comments

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-07-08 10:56:47 -04:00
Ashish Bhate
eabae5437b MM-26015: ensure admin retains permissions to team after being removed from a team (#14961)
Summary:
Ensure admin retains permissions to team after being removed from a team

Ticket Link:
https://mattermost.atlassian.net/browse/MM-26015
2020-07-08 16:59:16 +05:30
Weblate (bot)
87be9bc2f5 Translations update from Weblate (#14872)
* Translated using Weblate (Malayalam)

Currently translated at 5.1% (103 of 1982 strings)

Translation: mattermost/mattermost-server_master
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ml/

Translated using Weblate (Malayalam)

Currently translated at 5.2% (105 of 1982 strings)

Translation: mattermost/mattermost-server_master
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ml/

Added translation using Weblate (Malayalam)

* Translated using Weblate (Dutch)

Currently translated at 81.7% (1621 of 1982 strings)

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

Translated using Weblate (Dutch)

Currently translated at 81.7% (1621 of 1982 strings)

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

Translated using Weblate (Dutch)

Currently translated at 81.7% (1620 of 1982 strings)

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

* Translated using Weblate (Turkish)

Currently translated at 100.0% (1974 of 1974 strings)

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

Translated using Weblate (Turkish)

Currently translated at 100.0% (1973 of 1973 strings)

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

Translated using Weblate (Turkish)

Currently translated at 100.0% (1972 of 1972 strings)

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

Translated using Weblate (Turkish)

Currently translated at 100.0% (1976 of 1976 strings)

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

Translated using Weblate (Turkish)

Currently translated at 100.0% (1975 of 1975 strings)

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

Translated using Weblate (Turkish)

Currently translated at 100.0% (1972 of 1972 strings)

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

Translated using Weblate (Turkish)

Currently translated at 100.0% (1982 of 1982 strings)

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

Translated using Weblate (Turkish)

Currently translated at 100.0% (1982 of 1982 strings)

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

Translated using Weblate (Turkish)

Currently translated at 100.0% (1982 of 1982 strings)

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

* Translated using Weblate (Chinese (Simplified))

Currently translated at 96.7% (1918 of 1982 strings)

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

* Translated using Weblate (Spanish)

Currently translated at 81.4% (1615 of 1982 strings)

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

* Translated using Weblate (Russian)

Currently translated at 100.0% (1982 of 1982 strings)

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

Translated using Weblate (Russian)

Currently translated at 100.0% (1982 of 1982 strings)

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

Translated using Weblate (Russian)

Currently translated at 83.2% (1651 of 1982 strings)

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

* Translated using Weblate (Italian)

Currently translated at 99.8% (1980 of 1982 strings)

Translation: mattermost/mattermost-server_master
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/it/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

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

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

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

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

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

* Deleted translation using Weblate (Malayalam)

Deleted translation using Weblate (Swedish)

Deleted translation using Weblate (Belarusian)

Deleted translation using Weblate (Arabic)

Deleted translation using Weblate (Amharic)

Translated using Weblate (Dutch)

Currently translated at 98.9% (1951 of 1972 strings)

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

Translated using Weblate (Portuguese (Brazil))

Currently translated at 98.8% (1949 of 1972 strings)

Translation: mattermost/mattermost-server_master
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pt_BR/

Translated using Weblate (Polish)

Currently translated at 98.8% (1949 of 1972 strings)

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

Translated using Weblate (Spanish)

Currently translated at 98.8% (1949 of 1972 strings)

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

Translated using Weblate (Japanese)

Currently translated at 98.8% (1949 of 1972 strings)

Translation: mattermost/mattermost-server_master
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

Translated using Weblate (Chinese (Traditional))

Currently translated at 98.8% (1949 of 1972 strings)

Translation: mattermost/mattermost-server_master
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/zh_Hant/

Translated using Weblate (Italian)

Currently translated at 99.7% (1967 of 1972 strings)

Translation: mattermost/mattermost-server_master
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/it/

Translated using Weblate (Ukrainian)

Currently translated at 98.8% (1949 of 1972 strings)

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

Translated using Weblate (Chinese (Simplified))

Currently translated at 99.6% (1965 of 1972 strings)

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

Translated using Weblate (French)

Currently translated at 98.8% (1949 of 1972 strings)

Translation: mattermost/mattermost-server_master
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

Translated using Weblate (Korean)

Currently translated at 98.8% (1949 of 1972 strings)

Translation: mattermost/mattermost-server_master
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ko/

Translated using Weblate (Romanian)

Currently translated at 98.8% (1949 of 1972 strings)

Translation: mattermost/mattermost-server_master
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ro/

Translated using Weblate (Russian)

Currently translated at 99.8% (1969 of 1972 strings)

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

Translated using Weblate (German)

Currently translated at 98.8% (1949 of 1972 strings)

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

Translated using Weblate (German)

Currently translated at 82.1% (1629 of 1982 strings)

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

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

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

* Added translation using Weblate (Belarusian)

Added translation using Weblate (Arabic)

Added translation using Weblate (Swedish)

Added translation using Weblate (Amharic)

* Translated using Weblate (Chinese (Simplified))

Currently translated at 99.8% (1973 of 1975 strings)

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

Translated using Weblate (Chinese (Simplified))

Currently translated at 99.8% (1973 of 1975 strings)

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

* Translated using Weblate (Amharic)

Currently translated at 13.1% (260 of 1975 strings)

Translation: mattermost/mattermost-server_master
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/am/

* Translated using Weblate (Arabic)

Currently translated at 24.0% (474 of 1975 strings)

Translation: mattermost/mattermost-server_master
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ar/

* Translated using Weblate (Russian)

Currently translated at 100.0% (1973 of 1973 strings)

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

Translated using Weblate (Russian)

Currently translated at 100.0% (1975 of 1975 strings)

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

* Translated using Weblate (Polish)

Currently translated at 98.5% (1947 of 1975 strings)

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

* Translated using Weblate (Dutch)

Currently translated at 98.6% (1950 of 1976 strings)

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

* Translated using Weblate (Italian)

Currently translated at 99.8% (1974 of 1976 strings)

Translation: mattermost/mattermost-server_master
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/it/

Translated using Weblate (Italian)

Currently translated at 99.8% (1974 of 1976 strings)

Translation: mattermost/mattermost-server_master
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/it/

* Translated using Weblate (German)

Currently translated at 98.1% (1948 of 1985 strings)

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

Translated using Weblate (Dutch)

Currently translated at 98.8% (1954 of 1976 strings)

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

* Translated using Weblate (Korean)

Currently translated at 98.3% (1943 of 1976 strings)

Translation: mattermost/mattermost-server_master
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ko/

* Translated using Weblate (Dutch)

Currently translated at 99.8% (1970 of 1972 strings)

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

Translated using Weblate (Dutch)

Currently translated at 99.8% (1974 of 1976 strings)

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

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

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

* Translated using Weblate (Spanish)

Currently translated at 99.8% (1970 of 1972 strings)

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

* Translated using Weblate (Japanese)

Currently translated at 99.8% (1972 of 1974 strings)

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

Translated using Weblate (Japanese)

Currently translated at 99.8% (1971 of 1973 strings)

Translation: mattermost/mattermost-server_master
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

* Translated using Weblate (Dutch)

Currently translated at 99.5% (1977 of 1985 strings)

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

Translated using Weblate (Dutch)

Currently translated at 99.8% (1972 of 1974 strings)

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

Translated using Weblate (Dutch)

Currently translated at 99.8% (1972 of 1974 strings)

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

Translated using Weblate (Dutch)

Currently translated at 99.8% (1971 of 1973 strings)

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

* Translated using Weblate (Romanian)

Currently translated at 100.0% (1974 of 1974 strings)

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

Translated using Weblate (Romanian)

Currently translated at 100.0% (1973 of 1973 strings)

Translation: mattermost/mattermost-server_master
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ro/

* Deleted translation using Weblate (Belarusian)

Deleted translation using Weblate (Swedish)

Deleted translation using Weblate (Arabic)

Deleted translation using Weblate (Amharic)

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 98.0% (1935 of 1974 strings)

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

* Translated using Weblate (Japanese)

Currently translated at 99.8% (1972 of 1974 strings)

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

* Translated using Weblate (Chinese (Traditional))

Currently translated at 98.1% (1948 of 1985 strings)

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

Translated using Weblate (Chinese (Simplified))

Currently translated at 99.4% (1974 of 1985 strings)

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

Translated using Weblate (Ukrainian)

Currently translated at 98.1% (1948 of 1985 strings)

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

Translated using Weblate (Turkish)

Currently translated at 100.0% (1985 of 1985 strings)

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

Translated using Weblate (Russian)

Currently translated at 99.6% (1978 of 1985 strings)

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

Translated using Weblate (Romanian)

Currently translated at 99.6% (1979 of 1985 strings)

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

Translated using Weblate (Portuguese (Brazil))

Currently translated at 98.1% (1949 of 1985 strings)

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

Translated using Weblate (Polish)

Currently translated at 98.3% (1952 of 1985 strings)

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

Translated using Weblate (Dutch)

Currently translated at 99.5% (1977 of 1985 strings)

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

Translated using Weblate (Korean)

Currently translated at 98.1% (1948 of 1985 strings)

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

Translated using Weblate (Japanese)

Currently translated at 99.5% (1977 of 1985 strings)

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

Translated using Weblate (Italian)

Currently translated at 99.4% (1975 of 1985 strings)

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

Translated using Weblate (French)

Currently translated at 98.1% (1948 of 1985 strings)

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

Translated using Weblate (Spanish)

Currently translated at 99.4% (1975 of 1985 strings)

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

* Translated using Weblate (Turkish)

Currently translated at 100.0% (1985 of 1985 strings)

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

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 99.8% (1983 of 1985 strings)

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

Co-authored-by: sreekanthgs <mail@sreekanth.in>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: aeomin <lin@aeomin.net>
Co-authored-by: Elias  Nahum <elias@mattermost.com>
Co-authored-by: Alexey Napalkov <flynbit@gmail.com>
Co-authored-by: mlongo <m.longo@metalsistem.com>
Co-authored-by: Elisabeth Kulzer <elisabeth.kulzer@mattermost.com>
Co-authored-by: yohannes <yohannesseifu3102@gmail.com>
Co-authored-by: majdy <majdydaood@gmail.com>
Co-authored-by: Daniel Burzmiński <daniel@hectorsky.net>
Co-authored-by: ctlaltdieliet38cb457c2b4c4eb2 <github3@controlaltdieliet.be>
Co-authored-by: potatogim <potatogim@potatogim.net>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: Viorel-Cosmin Miron <cosmin@uhlhost.net>
Co-authored-by: rodrigocorsi <rodrigocorsi@gmail.com>
Co-authored-by: maruTA-bis5 <bis5.wsys@gmail.com>
2020-07-08 12:07:58 +02:00
Jesús Espino
98d5b7a5a5 Fix jobserver run (#14983) 2020-07-08 10:03:02 +02:00
Christopher Speller
bebff8156b MM-26056 Add plugin ability to execute slash command. (#14898)
* Add plugin ability to execute slash command.

* A test

* Add site url to command args for plugin API

* Remove unessiary complexity.
2020-07-07 09:31:03 -07:00
Jesús Espino
b977017ca7 Extracting email functions into a service (#14802)
* Extracting email functions into a service

* Fixing two shadowing errors

* Address PR review comments

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-07-07 10:03:21 +02:00
Agniva De Sarker
10f5a8890c MM-24972: make GetHubForUserId lock-less and zero-alloc (#14945)
* MM-24972: make GetHubForUserId lock-less and zero-alloc

The hubs aren't meant to be modified after the server starts up.
But the key problem was the SetHubs method which would zero out
the underlying hubs slice.

This wasn't ideally necessary because an hub would only be stopped
once during server shutdown. However, this was required by a test
which would shutdown the hub twice. And since the hub shutdown isn't
idempotent, zeroing the slice would just skip over shutting down the hub again.

To improve the overall situation, we apply several optimizations.

- We use the new hash/maphash package which exposes Go runtime's
internal hash algorithms to be used as a package. This is much faster
than hash/fnv.
- We move around the initialization of the hub to happen before
the metrics server starts. This allows us to initialize the hub
before any of the hub elements are being accessed.
- To make the test run successfully, we do not call th.TearDown.
This is fine for a test, because anyways the test process would eventually stop
and relinquish the resources to the OS.

This allows us to completely remove any mutexes and thereby
we can remove all the methods and any edge-case checks related to
index being out of bounds. As a result, the fast path becomes
very straightforward and zero-alloc.

name               old time/op    new time/op    delta
GetHubForUserId-8     116ns ± 1%      38ns ± 7%   -67.22%  (p=0.000 n=10+10)

name               old alloc/op   new alloc/op   delta
GetHubForUserId-8     36.0B ± 0%      0.0B       -100.00%  (p=0.000 n=10+10)

name               old allocs/op  new allocs/op  delta
GetHubForUserId-8      2.00 ± 0%      0.00       -100.00%  (p=0.000 n=10+10)

Manually tested with some load testing and running Hub tests in -race mode.

* remove mutex

* incorporate review comments
2020-07-07 11:23:45 +05:30
Harrison Healey
de6a57cdc3 Sidebar V2 Phase 2 (#14967)
* parent 48256721c4 (#14358)

author Eli Yukelzon <reflog@gmail.com> 1585814774 +0300
committer Eli Yukelzon <reflog@gmail.com> 1589111022 +0300

Sidebar caregories implemented

Apply suggestions from code review

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>

Update store/sqlstore/channel_store.go

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>

Update store/sqlstore/channel_store.go

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>

code review suggestions

status messages

edge case

bugs...

timeout reverse

* MM-25126 Add a separate default sorting method for categories (#14575)

* MM-25158 Add user to initial sidebar categories when joining team (#14570)

* MM-25281  Place new categories in the correct position (#14609)

* MM-25277  Return channels that aren't in a category as part of the Channels/Direct Messages categories (#14601)

* MM-25276  Remove categories when leaving a team (#14600)

* Remove categories when leaving a team

* layers

* corrected cleanup function

* lint

* .

* corrected errors in postgres

* .

* MM-25280  Ensure that the "update category order" API call only contains real category IDs and isn't missing any IDs (#14626)

* Ensure that the "update category order" API call only contains real category IDs and isn't missing any IDs

* tests

* correct status code

* MM-25278  Change "update category" API to return 400 when changing unsupported fields (#14599)

* MM-25279  Change category migration to only populate channels in Favorites (#14627)

* MM-25157 Add API to delete custom categories  (#14574)

* MM-25157 Add API to delete custom categories

* get categories fix

* maxorder fix

* Use correct websocket event when deleting category

* Fix tests and remove debug code

* Actually use the right websocket event this time

* test cleanup

* Update test for new category order

Co-authored-by: Eli Yukelzon <reflog@gmail.com>

* MM-24914 Various fixes for sidebar channel handling (#14756)

* Fix checking for channel membership when reordering channels

* Remove unique constraint on SidebarCategories

* Set column sizes for SidebarCategories and SidebarChannels tables

* Allow changing the sorting method for non-DM categories

* Fix nil pointers in error handling

* Fix orphaned channels from other team being returned in Channels category

* Fix non-orphaned channels being duplicated in the Channels category

* Remove unique constraint on SidebarChannels

* Fix category/name of favorites preferences

* Fix testSidebarChannelsMigration

* Rename err to nErr and appErr to err

* Fix channel order returned by GetSidebarCategories on MySQL

* Fix adding/removing favorites preferences

* Remove leftover TODO

* Change SidebarCategoryType enums to use full names (#14786)

* Change SidebarCategoryType enums to use full names

* Fix Channels constant

* Remove leftover debug code

* MM-24914 Fix updateCategory endpoint returning the wrong type (#14795)

* MM-24914 Make some changes to UpdateSidebarCategories (#14806)

* Fix orphaned DMs not always being returned

* MM-24914 Make some changes to UpdateSidebarCategories

* Run updateSidebarCategoryOrderT in a transaction

* Fix deleting SidebarChannels based on order of arguments to UpdateSidebarCategories

* bump for api testing

* bump for api testing

* Change CreateInitialSidebarCategories to return a plain error

* Change MigrateSidebarCategories to return a plain error

* Remove usage of UpdateColumns when updating sidebar categories (#14843)

* Remove usage of UpdateColumns when changing category order

* Add a random test case

* Remove usage of UpdateColumns when updating sidebar categories (#14843)

* Remove usage of UpdateColumns when changing category order

* Add a random test case

* Remove usage of UpdateColumns when updating sidebar categories (#14843)

* Remove usage of UpdateColumns when changing category order

* Add a random test case

* MM-26343 Make CreateInitialSidebarCategories idempotent (#14870)

* Fix bad merge

* Fix another bad merge

* Fix unintentionally removed i18n string

Co-authored-by: Eli Yukelzon <reflog@gmail.com>
2020-07-06 18:20:35 -04:00
Dušan Panić
83a80a2422 Implemented AmazonS3PathPrefix (#14917)
* Implemented AmazonS3PathPrefix

* Remove unecessary method

* fix for test

* fix for test which are failing

* fix for test which are failing

* fix for test

Co-authored-by: Dusan Panic <dusan@salestrekker.com>
2020-07-07 00:20:13 +02:00
Eric Sadur
70084f107c changing license renewal link to point to new renewal webpage (#14907)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-07-06 14:15:00 -04:00
Agniva De Sarker
58dc0772bc MM-26346: check for nil Message in DisableMentionHighlights (#14972)
Sometimes a PostPatch may not contain the message field. For example,
while pinning a post, only the IsPinned field is set, and everything
else is nil. In that case, DisableMentionHighlights would throw a panic.

We handle that case by checking for nil first.
2020-07-06 20:29:36 +05:30
Ashish Bhate
af8b914c6c MM-23596: Ability to list private channels for team (#14925)
Summary:
store, app, api and go driver support for listing private channels

Ticket Link:
https://mattermost.atlassian.net/browse/MM-23596
2020-07-06 12:34:29 +05:30
Jesús Espino
a4fc0fcfb7 Adding terms_accepted and receive_emails_accepted params to request trial (#14937) 2020-07-03 12:17:34 +02:00
Christopher Speller
3e9ec51890 Mm 16292 support command overrides (#14951)
* Supporing plugins that override built-in commands.

* Test.

* Fix test.

* Fix override order for command autocomplete.

* Fix test copy paste errors

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-07-02 13:28:21 -07:00
Christopher Poile
f5be738923 MM-26339 - Add context and CommandArgs to dynamic autocomplete calls (#14940)
* pass commandArgs and pluginContext to dynamic list suggestion calls

* update tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-07-02 08:08:58 -07:00
Agniva De Sarker
71925ea224 MM-26031: Migrate reaction store to plain errors (#14931)
* ReactionStore migration to return plain errors

* Fix translations

* FixImports

* Rollback fix imports

* Fix merge conflict

* add ent translation

Co-authored-by: Rodrigo Villablanca <villa061004@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-07-02 09:43:28 +05:30
Doug Lauder
00aeca0e5c MM-26064 - ENV var license override (#14943)
* License provided through env var takes precedence over other license sources
2020-07-01 13:27:37 -04:00
Hossein Ahmadian-Yazdi
4c50c7c59b [MM-25780] Fix incorrect session length when logging in through mobile using SSO (#14874)
* Pass device ID

* dont use device id as way of detecting

* fix spelling mistake

* update layers

* fix test

* fix linting

* save schema

* put columns in correct place

* fix linting

* update

* upgrade go change

* use props

* fix stuff

* update session tests

* address PR comments

* address PR comments
2020-06-30 10:34:05 -04:00
Miguel de la Cruz
df943fbf91 [MM-26397] Take query size and order into account for Bleve (#14882)
* [MM-26397] Take query size and order into account for Bleve

* Add a test to check post search pagination

* Add tests for checking limit when searching users

* Make pagination an independent test to discriminate DB engines
2020-06-30 15:38:58 +02:00
Carlos Tadeu Panato Junior
10af90fa27 Update Dockerfile (#14946)
* update alpine base image to 3.12

* update MM package to use 5.24.2 as default
2020-06-30 14:45:17 +02:00
Carlos Tadeu Panato Junior
607d409473 upgrade db to 5.25 (#14947) 2020-06-30 14:44:48 +02:00
Ben Schumacher
43f7acd45a [MM-26507] Send license type for install plugin request (#14913) 2020-06-30 14:17:00 +02:00
Ben Schumacher
a34ea6ad63 [MM-26463] Keep query parameter for interplugin requests (#14905) 2020-06-30 10:13:27 +02:00
Agniva De Sarker
08457860cc MM-26571: Move the semaphore creation before hub start (#14938)
This avoids the race of assigning the sema field from the start method
which runs in a goroutine.

The race that happens is

==================

WARNING: DATA RACE
Write at 0x00c003a9d1b0 by goroutine 67:
  github.com/mattermost/mattermost-server/v5/app.(*PushNotificationsHub).start()
      /home/agniva/mattermost/mattermost-server/app/notification_push.go:264 +0x90

Previous read at 0x00c003a9d1b0 by goroutine 69:
  github.com/mattermost/mattermost-server/v5/app.(*Server).createPushNotificationsHub()
      /home/agniva/mattermost/mattermost-server/app/notification_push.go:260 +0x1d5
2020-06-30 13:15:05 +05:30
Agniva De Sarker
f305cfe9ae MM-26563: Skip TestCreatePostCheckOnlineStatus if timeout exceeds (#14935)
We just skip the test instead of failing because waiting for more than 5 seconds
to get a response does not make sense, and it will unncessarily slow down
the tests further in an already congested CI environment.
2020-06-30 08:25:47 +05:30
Michael Kochell
11bc28b5fb [MM-26532] Support "active" filter on profile search (#14923)
* Support "active" filter on profile search

* Add tests for active user filter
2020-06-29 15:52:46 -04:00
Mario de Frutos Dieguez
bec2f366a7 [MM-24334] Include role filtering in ES search (#14465)
* ES supports role filtering for users

- Added roles field for ES user index
- Include role filtering logic in ES
2020-06-29 21:24:36 +02:00
Jesús Espino
e2e352e223 Change the App dependency with Server in migrations package (#14804)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-06-29 18:00:16 +02:00
Agniva De Sarker
a9ba052207 MM-26206: Add GroupMentions permissions in default channel admin (#14838)
* MM-26206: Add GroupMentions permissions in default channel admin

This permission was skipped from the default permissions function.
Which led to a bug where permissions reset would not bring back
this permission to the different roles.

* Added tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-06-29 21:04:29 +05:30
Jesús Espino
05dc928576 Better handling of errors on trial license request (#14886)
* Fix behavior on blank site url on trial requests

* Adding trial license error response handling

* Changing text based on PR review comments
2020-06-29 17:22:50 +02:00
Farhan Munshi
9e12a34e3c [MM-25568] LDAP Sync skip users and log when they dont match the restricted email of a team or channel (#14895)
* Dont return an error if createDefaultChannelMemberships fails due to email domain restriction on team

* Add test ensuring sync works as intended and only skips over failed users

* Remove unneeded line

* Update wording

* Trigger CI
2020-06-29 10:42:03 -04:00
Agniva De Sarker
d3156395a1 MM-25943: Upgrade dependencies for server (#14932)
* MM-25943: Upgrade dependencies for server

* tmp
2020-06-29 17:49:46 +05:30