Commit Graph

12058 Commits

Author SHA1 Message Date
Bolarinwa Balogun
2186af4d13 Convert store/storetest/post_store.go t.Fatal to assert/require (#13608) 2020-01-18 20:53:42 +01:00
Jesse Hallam
6d79484e55 MM-21645: COALESCE(Bots.LastIconUpdate, 0) (#13638)
Handle a potentially `NULL` Bots.LastIconUpdate and `COALESCE` back to `0`. This column has no default, and while v5.20 should never write it as `NULL`, any pre-v5.20 server writing to the new schema will. As a result, this change ensures backwards compatibility.

Fixes: https://mattermost.atlassian.net/browse/MM-21645
Fixes: https://mattermost.atlassian.net/browse/MM-21585
2020-01-17 17:16:18 -04:00
Shobhit Gupta
7d99d8fba7 Add IsValid method to *Manifest struct (#13609) 2020-01-17 21:08:55 +01:00
Scott Bishel
b71a6b9f8d MM-21725 change to singular (#13634) 2020-01-17 19:22:41 +05:30
Ben Schumacher
3491c3abb2 Respect HomepageURL in manifest for local plugins (#13595)
* Respect HomepageURL in manifest for local plugins

* Add documentation for updating the plugin signatures
2020-01-17 09:09:58 +01:00
Someone
566f28be0a GH-12702 v2: Add new command response parameter: "skip_slack_p… (#13420)
Add new command response parameter: "skip_slack_parsing". Skips Slack magic if set to "true". (#12702)
2020-01-17 08:34:11 +01:00
Jesse Hallam
4314a0427f MM-21328: Fix KVCompareAndSet when new==old (#13612)
`KVCompareAndSet(key, sameValue, sameValue)` can fail spuriously on MySQL if the underlying `UPDATE` requires no actual changes. As per the [MySQL documentation](https://dev.mysql.com/doc/refman/8.0/en/mysql-affected-rows.html), we can't rely on rows affected in this case:

> For UPDATE statements, the affected-rows value by default is the number of rows actually changed. If you specify the CLIENT_FOUND_ROWS flag to mysql_real_connect() when connecting to mysqld, the affected-rows value is the number of rows “found”; that is, matched by the WHERE clause.

It's not tenable to change `CLIENT_FOUND_ROWS` for the all connection, so handle this case in the code instead by running a `SELECT` after the fact. Note that `KVCompareAndSet` has no guarantee of atomicity in this case, but neither would `CompareAndSwap` on which this is method was inspired.

Finally, note that no changes are required for Postgres, which has sane semantics as the default.

Fixes: https://mattermost.atlassian.net/browse/MM-21328

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-16 15:29:10 -04:00
Maria A Nunez
c21ea5bc06 MM-19445 - Added version information to plugin diagnostics data (#13408)
* MM-19609 - Add new prepackage configuration settings (#13062)

* Add signatures to the prepackaged plugins (#13138)

* MM-19612 - Support querying local plugin marketplace when upst… (#13250)

* MM-19612 - Support querying local plugin marketplace when upstream unavailable or disabled

* Update translations file

* Fixed comment

* Updated to check EnableRemoteMarketplace setting and LocalOnly to get marketplace plugins

* Fixed unit tests

* Tests cleanup code

* Removed unused error message

* Updated tests

* MM-19614- Updated Marketplace Service error id (#13388)

* Added version information to plugin diagnostics data

* [MM-19610] Consume prepackaged plugins (#13005)

* consume prepackaged plugins into memory

* missing i18n

* remove spurious .gitignore changes

* return on failure to install prepackged plugins

* cleanup

* s/plugins/availablePlugins

* whitespace

* don't return extractDir when not needed

* s/plug/plugin

* error on icon, cleanup

* update armored version of testplugin signature

* honour AutomaticPrepackagedPlugins

* document getPrepackagedPlugin

* MM-19613 - Include prepackaged plugins in marketplace results (#13433)

* Added prepackaged plugins to marketplace results

* PR Feedback

* PR Feedback

* Update error where definition

* Removing unnecessary var declaration

* Updated comments

* MM-21263 - Use EnableRemoteMarketplace in marketplace install… (#13438)

* MM-21263 - Use EnableRemoteMarketplace in marketplace install endpoint

* Call updateConfig before calling NewServer in TestHelper

* Added translations

* PR feedback

* Translations

* Feedback

* s/helpers.go/download.go

* Converging env.PrepackagedPlugins

* Initial PR feedback

* Ordered imports properly

* Updated DownloadURL to return slice of bytes

* Fixed method typo

* Fixed logging

* Added read lock for prepackaged plugins list

* PR Feedback

* Added condition to only install prepackaged plugin if it was previously enabled

* Linting

* Updated to check plugin state in config

* Flatten out version number to its own entries. Added webex

* Updated tests

Co-authored-by: Ali Farooq <ali.farooq0@pm.me>
Co-authored-by: Shota Gvinepadze <wineson@gmail.com>
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2020-01-16 08:46:36 -05:00
Martin Kraft
3d5f36cc4a MM-12773: Return error if ChannelMemberHistory record creation fails. (#13517)
* MM-12773: Fail if creating ChannelMemberHistory record fails.

* MM-12773: Guard against attempting to create duplicate channel member history record.
2020-01-16 17:13:32 +05:30
Agniva De Sarker
2a28edcd93 MM-21481: Fixed several issues from user marshalling (#13627)
* MM-21481: Fixed several issues from user marshalling

- Fixed the root cause for panic by properly converting
the map to a User struct.
- Added a check for type conversion for extra safety.
- Fixed a somewhat unrelated issue of a pointer to pointer reference.

* Fix tests
2020-01-16 09:18:08 +01:00
Maria A Nunez
87eb7697f9 MM-19606- Rework Prepackaged Plugins (#13449)
* MM-19609 - Add new prepackage configuration settings (#13062)

* Add signatures to the prepackaged plugins (#13138)

* MM-19612 - Support querying local plugin marketplace when upst… (#13250)

* MM-19612 - Support querying local plugin marketplace when upstream unavailable or disabled

* Update translations file

* Fixed comment

* Updated to check EnableRemoteMarketplace setting and LocalOnly to get marketplace plugins

* Fixed unit tests

* Tests cleanup code

* Removed unused error message

* Updated tests

* MM-19614- Updated Marketplace Service error id (#13388)

* [MM-19610] Consume prepackaged plugins (#13005)

* consume prepackaged plugins into memory

* missing i18n

* remove spurious .gitignore changes

* return on failure to install prepackged plugins

* cleanup

* s/plugins/availablePlugins

* whitespace

* don't return extractDir when not needed

* s/plug/plugin

* error on icon, cleanup

* update armored version of testplugin signature

* honour AutomaticPrepackagedPlugins

* document getPrepackagedPlugin

* MM-19613 - Include prepackaged plugins in marketplace results (#13433)

* Added prepackaged plugins to marketplace results

* PR Feedback

* PR Feedback

* Update error where definition

* Removing unnecessary var declaration

* Updated comments

* MM-21263 - Use EnableRemoteMarketplace in marketplace install… (#13438)

* MM-21263 - Use EnableRemoteMarketplace in marketplace install endpoint

* Call updateConfig before calling NewServer in TestHelper

* Added translations

* PR feedback

* Translations

* Feedback

* s/helpers.go/download.go

* Converging env.PrepackagedPlugins

* Initial PR feedback

* Ordered imports properly

* Updated DownloadURL to return slice of bytes

* Fixed method typo

* Fixed logging

* Added read lock for prepackaged plugins list

* PR Feedback

* Added condition to only install prepackaged plugin if it was previously enabled

* Linting

* Updated to check plugin state in config

* Closing filereader

* Only add local label if remote marketplace is enabled

* Updated local tag description

* Fixed tests

Co-authored-by: Ali Farooq <ali.farooq0@pm.me>
Co-authored-by: Shota Gvinepadze <wineson@gmail.com>
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2020-01-15 13:38:55 -05:00
Claudio Costa
508fbf2f53 Make LocalCacheUserStore.Get/GetProfileByIds return a copy of the stored data (#13620) 2020-01-15 19:01:04 +01:00
Jason Frerich
a001ecabe2 Update bundled plugins for v5.20 (#13621) 2020-01-15 10:30:58 -06:00
Eli Yukelzon
8e0fe90897 Thread fetching revert (#13616)
* Revert "MM-19371 - Reply count disappears from pinned and flagged conv… (#12753)"
2020-01-15 17:14:04 +02:00
Carlos Tadeu Panato Junior
da97740cc2 bump alpine version and mm as well (#13615) 2020-01-15 16:07:09 +01:00
Scott Bishel
70a7ad2969 add additional reserved team name (#13606)
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-14 14:39:05 -07:00
Eli Yukelzon
e77ef9733c MM-20977 - Inviting multiple users with valid/allowed and inva… (#13372) 2020-01-14 15:29:50 +02:00
Rajat Varyani
51a61f6bc1 [MM-19720] Expose endpoint for config patch (#12997) 2020-01-14 13:06:17 +01:00
Vladimir Lebedev
69f4dcd955 MM-19463 - Migrate tests from "web/webhook_test.go" to use testify (#13524)
* MM-19463 - Migrate tests from "web/webhook_test.go" to use testify

* fix shadows declaration

* make test cleaner

* fix wrong test order

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-14 11:09:11 +01:00
Ben Schumacher
6e9e849871 Fix issues found by golangci v1.22.2 (#13568) 2020-01-14 10:08:51 +01:00
Ben Schumacher
2d9e85e82a [MM-20706] Drop 26 character requirement from post action IDs (#13225) 2020-01-14 07:18:14 +01:00
Ben Schumacher
1f3f8fbf57 [MM-21123] Add Labels to upstream Marketplace response (#13425)
* Add Labels to upstream Marketplace response

* Add LOCAL label to local plugins
2020-01-14 07:16:36 +01:00
Devin Binnie
8e2c59ca00 [MM-17155] Changes to email notifications to support Deep Linking page (#13362)
* Change link to redirect email notifications to landing page

* Fix to undefined variable

* Change `vault` to `landing`

* Added a couple tests

Co-authored-by: David Meza <dmeza@users.noreply.github.com>
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-13 16:24:28 -05:00
Vladimir Lebedev
ed555faa75 MM-19137 - Migrate tests from "model/post_test.go" to use test… (#13521)
* MM-19137 - Migrate tests from "model/post_test.go" to use testify

* revert go.sum file

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-13 15:07:41 -05:00
Scott Bishel
aa0d0f9943 MM-21102: Add ExperimentalSettings.UseNewSAMLLibrary to diagnostics (#13543)
* add UseNewSAMLLibrary to diagnostics.go

* add UseNewSAMLLibrary to diagnostics.go

* add TRACK_CONFIG_EXPERIMENTAL to expected results

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-13 23:24:30 +05:30
Hossein Ahmadian-Yazdi
dc24c9abe8 [MM-20061] Add System Admin filter to both LDAP and SAML (#13534)
* promote user to admin upon login

* Add SAML support for admin accounts

* update en.json

* update i18n

* Add tests as per comments

* change function name

* fix config.go

* invalidate cache so its not checking for cache when roles change

* add enable attribute and filter
2020-01-13 12:50:01 -05:00
Patryk Pomykalski
5f7ca55b13 MM-21520: Remove temporary databases after tests run (#13572)
* MM-21520: Remove temorary databases after tests run

* accidental test name change

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-13 16:54:07 +01:00
Agniva De Sarker
0361e8b97e MM-21210: Add LRU cache for ChannelStore.GetMembersForUser (#13593)
Automatic Merge
2020-01-13 10:46:51 -05:00
Agniva De Sarker
8b24b26cb0 MM-21356: Conditionally set user status online (#13538)
* MM-21356: Conditionally set user status online

Check for the set_online query param and do not set the status
if it is set to false.

* Fix some issues

* Add a test

* Log an error if an invalid value was passed

* Logging a warning instead of error

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-13 20:20:56 +05:30
Eli Yukelzon
49308e9163 MM-21229 - Customization > Site Name help text doesn't match text field behavior (#13540)
Automatic Merge
2020-01-13 05:46:51 -05:00
larkox
d4935fb22f [GH-13073] Migrate profilesInChannelCache cache from store/sqlstore/user_store.go to the new store/localcachelayer (#13536)
* Migrate profilesInChannelCache cache from store/sqlstore/user_store.go to the new store/localcachelayer

* Fix lint errors

* Remove unneeded cluster messages

* Remove unneeded cluster message registering

* Fix cluster messages

* Correct mistake with messages and restore model message
2020-01-11 17:52:44 +01:00
Martin Kraft
605040c597 MM-20644: Add users to teams as a SchemeAdmin based on a new configuration field on GroupTeams and GroupChannels records. (#13361)
* MM-20644: Add users to teams as a SchemeAdmin based on a new configuration field on GroupTeams and GroupChannels records.

* MM-20644: Adds SchemeAdmin to mapping of the GroupSyncable struct fields.

* MM-2064: Adds test to ensure SchemeAdmin field value is mapped.

* MM-20644: Adds missing index creation for fresh DBs.

* MM-20644: Duplicates UpdateMembersRole across Team and Channel stores. Adds tests.

* MM-20644: Fixes some old method name references.

* MM-20644: Moves variable declaration; removes Println statement.

* MM-20644: Use a SQL query instead of two to update Team and Channel members.

* MM-20644: Fixes tests; updates query.

* MM-20644: Fix permission check for patching a group syncable.

* MM-20644: Fixes test for change of permissions verification in group patch API request.

* MM-20644: Fix for ORM select vs insert.

* MM-20644: Linting fixes.

* MM-20644: Fixes some tests.

* MM-20644: Skips changing the role of guests.

* MM-20644: Added syncableID filtering
2020-01-10 09:19:39 -08:00
Bolarinwa Balogun
04430041a8 Convert store/storetest/compliance_store.go t.Fatal to require (#13607) 2020-01-10 08:57:13 -08:00
Vladimir Lebedev
a2e2b6d9b8 MM-19274 - Migrate tests from "model/config_test.go" to use testify (#13522) 2020-01-10 11:52:00 +01:00
Scott Bishel
7a3af8555f MM-21548: Fix Flakey Test (#13599)
* Ensure both DeleteAt and UpdateAt are set to same value

* fix another point this could happen

* Revert "fix another point this could happen"

This reverts commit 5deb102e78.
2020-01-10 11:30:07 +01:00
catalintomai
37ce413b7d MM-20698: Add server support for getting SAML metadata and updating S… (#13311)
* MM-20698: Add server support for getting SAMl metadata and updating SAMl settings
2020-01-09 21:25:20 -08:00
Patryk Pomykalski
c41e9d970a Optimize queries and indexes on posts table (#13217)
* Optimize queries and indexes on posts table

Added RootId column to two indexes. Query in getParentPosts split into
two queries - for big channels can be ~1000x times faster in MySQL, but
a bit slower in PostgreSQL.
Rewritten query in GetPostsSince for MySQL - around 20% faster.
Benchmark results (/1 - 140k posts in channel, /2 - 800 posts):

benchmark                                                         old ns/op      new ns/op     delta
BenchmarkPosts/postgres/GetFlaggedPostsForTeam/1-16               12068006       12130615      +0.52%
BenchmarkPosts/postgres/GetFlaggedPostsForChannel/1-16            7334992        7388359       +0.73%
BenchmarkPosts/postgres/GetPosts(skipThreads=true)/1-16           1845547        1979362       +7.25%
BenchmarkPosts/postgres/GetPosts(skipThreads=false)/1-16          2260061        2595112       +14.82%
BenchmarkPosts/postgres/GetPostsSince(skipThreads=true)/1-16      38510212       40625368      +5.49%
BenchmarkPosts/postgres/GetPostsSince(skipThreads=false)/1-16     32389821       32581044      +0.59%
BenchmarkPosts/postgres/GetFlaggedPostsForTeam/2-16               1604215        1584941       -1.20%
BenchmarkPosts/postgres/GetFlaggedPostsForChannel/2-16            1278623        1277473       -0.09%
BenchmarkPosts/postgres/GetPosts(skipThreads=true)/2-16           1921049        1984581       +3.31%
BenchmarkPosts/postgres/GetPosts(skipThreads=false)/2-16          3478147        3000086       -13.74%
BenchmarkPosts/postgres/GetPostsSince(skipThreads=true)/2-16      4813332        5198276       +8.00%
BenchmarkPosts/postgres/GetPostsSince(skipThreads=false)/2-16     3475847        3816201       +9.79%
BenchmarkPosts/mysql/GetFlaggedPostsForTeam/1-16                  9674132        9708361       +0.35%
BenchmarkPosts/mysql/GetFlaggedPostsForChannel/1-16               5780763        5818874       +0.66%
BenchmarkPosts/mysql/GetPosts(skipThreads=true)/1-16              2261194        2268826       +0.34%
BenchmarkPosts/mysql/GetPosts(skipThreads=false)/1-16             2371804023     3184120       -99.87%
BenchmarkPosts/mysql/GetPostsSince(skipThreads=true)/1-16         35552813       27709811      -22.06%
BenchmarkPosts/mysql/GetPostsSince(skipThreads=false)/1-16        28758400       22622865      -21.33%
BenchmarkPosts/mysql/GetFlaggedPostsForTeam/2-16                  1174064        1205933       +2.71%
BenchmarkPosts/mysql/GetFlaggedPostsForChannel/2-16               1007026        1091551       +8.39%
BenchmarkPosts/mysql/GetPosts(skipThreads=true)/2-16              2274397        2408730       +5.91%
BenchmarkPosts/mysql/GetPosts(skipThreads=false)/2-16             7454395        2542741       -65.89%
BenchmarkPosts/mysql/GetPostsSince(skipThreads=true)/2-16         8879200        6843435       -22.93%
BenchmarkPosts/mysql/GetPostsSince(skipThreads=false)/2-16        6293932        5373276       -14.63%

* old version of getParentsPosts for PostgreSQL

because new version using two queries is around 15% slower.

* review fixes

* revert index changes
2020-01-10 10:26:44 +05:30
Agniva De Sarker
d938d70dcd MM-21211: Optimize Channelstore.UpdateLastViewedAt (#13529)
* MM-21211: Optimize Channelstore.UpdateLastViewedAt

For postgres, we use CTEs to do both queries at one
and return the data.

For mysql, CTEs aren't available until version 8. So we just optimize the
existing query.

- We use IN instead of multiple OR conditions for the channel membership check.
According to mysql https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_in:

If no type conversion is needed for the values in the IN() list,
they are all constants of the same type, and expr can be compared to each of them
as a value of the same type (possibly after type conversion), an optimization takes place.

The values the list are sorted and the search for expr is done using a binary search,
which makes the IN() operation very quick.

- We use the previous column LastViewedAt to replace the value of LastUpdateAt
instead of doing a switch case again.

https://dev.mysql.com/doc/refman/5.6/en/ansi-diff-update.html

If you access a column from the table to be updated in an expression, UPDATE uses the
current value of the column.

Results (ran with getchannel profile):

Postgres:
| Metric | Baseline | Actual | Delta | Delta % |
| --- | --- | --- | --- | --- |
| Hits | 1594 | 1574 | -20 | -1.25%
| Error Rate | 0.00% | 0.00% | 0% | 0% |
| Mean Response Time | 7.08ms | 6.36ms | -0.72ms | -10.20% |
| Median Response Time | 5.00ms | 4.00ms | -1.00ms | -20.00% |
| 95th Percentile | 9.00ms | 8.00ms | -1.00ms | -11.11% |

Mysql:
| Metric | Baseline | Actual | Delta | Delta % |
| --- | --- | --- | --- | --- |
| Hits | 1600 | 1566 | -34 | -2.12%
| Error Rate | 0.00% | 0.00% | 0% | 0% |
| Mean Response Time | 7.39ms | 7.02ms | -0.37ms | -4.94% |
| Median Response Time | 6.00ms | 6.00ms | 0ms | 0% |
| 95th Percentile | 10.00ms | 10.00ms | 0ms | 0% |

* Add comment on using CTEs for mysql8

* incorporate review comments

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-09 22:04:30 +05:30
Agniva De Sarker
efffb790e4 MM-21608: Remove buggy migration code (#13600)
This code is old and not required to be present now.
2020-01-09 21:32:03 +05:30
Agniva De Sarker
2dba5dbf86 MM-21368: Optimize MapStringsToQueryParams (#13601)
- Use strings.Builder which minimizes allocations.
- Avoid fmt.Sprintf which is slower than simple string concat.

Results:

name                                      old time/op    new time/op    delta
MapStringsToQueryParams/one_item-8           512ns ± 2%     377ns ± 1%  -26.27%  (p=0.000 n=10+9)
MapStringsToQueryParams/multiple_items-8     858ns ± 5%     748ns ± 2%  -12.82%  (p=0.000 n=10+9)

name                                      old alloc/op   new alloc/op   delta
MapStringsToQueryParams/one_item-8            456B ± 0%      384B ± 0%  -15.79%  (p=0.000 n=10+9)
MapStringsToQueryParams/multiple_items-8      608B ± 0%      592B ± 0%   -2.63%  (p=0.000 n=10+10)

name                                      old allocs/op  new allocs/op  delta
MapStringsToQueryParams/one_item-8            8.00 ± 0%      6.00 ± 0%  -25.00%  (p=0.000 n=10+10)
MapStringsToQueryParams/multiple_items-8      12.0 ± 0%      12.0 ± 0%     ~     (all equal)
2020-01-09 07:44:01 -08:00
Hector
62b57143c8 [MM 19840] Create a Cache Interface abstraction to support multiple cache backends (#13384)
* Refactor to use structured logging

* Properly formatted with gofmt

* created interface Cache, but construction of cache is still coupled.

* Implementing cache factories to build caches

* Simple redis implementation without error handling. Keys and values by default are string

* refactor NewLocalCacheLayer to inject cache factory

* Removed redis impl to focus on cache abstraction

* CacheFactory injected on sqlsupplier and saved in Store struct

* remove useless private method

* replace concrete declaration of lru cache to cache abstraction

* discard spaces

* Renamed factory to provider because concrete implementations of factories may hold an state (such as a redis client for example)

* refactor to include all caches in the same package cache and subpackages

* method close cache. This method will be used for concrete implementations that need to release resources (close a connection, etc)

* closing cacheprovider and releasing resources while closing sql store

* fixed merge conflict fail

* gofmt files

* remove unused property from post_store

* naming refactor to avoid stutter. Added godocs on interface

* Store doesnt know anything about the cache and provider. Cache provider will be built after loading config and injected in localCacheLayer

* fixed broken test

* cache provider initialized before RunOldAppInitialization which initializes the localcachelayer

* move statusCache to server to initialize it with the new cache provider

* update terms_service and channel_layer to have new cacheProvider

* gofmt

* Add Connect method to the cache provider

* mock cacheprovider in user_layer_test

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-09 09:57:28 +01:00
Allen Lai
1909fd6607 [MM-20804] Add "Unarchive Channel" option to the channel info screen (#13349)
* add websocket hooks to restoreChannel

* add userId to call in api4

* add constant

* undo changes in en.json

* add constants to en.json

* delete  code for deleting webhooks

* Update i18n/en.json

Co-Authored-By: Ben Schumacher <ben.schumacher@mattermost.com>

* restore channel ordering

* delete Props

* Update app/channel.go

Co-Authored-By: Ben Schumacher <ben.schumacher@mattermost.com>

* Update app/channel.go

Co-Authored-By: Ben Schumacher <ben.schumacher@mattermost.com>

* change message format

* move WS message right after invalidate

* manually reorder en.json entry

* reorder en.json

* undelete to restore

* update en.json ordering

* update wording

* Update model/post.go

Co-Authored-By: Saturnino Abril <saturnino.abril@gmail.com>

* Update model/websocket_message.go

Co-Authored-By: Saturnino Abril <saturnino.abril@gmail.com>

* gofmt

* undeleted to restored

* add test to success case

* delete repeated test

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-09 09:42:29 +01:00
lindalumitchell
397e83f870 Remove redundant in-line image tests (#13578) 2020-01-09 14:35:47 +08:00
Doug Clark
7f6074b300 GH-13570 Allow /static/plugins/* endpoint responses to be cached (except for 404s) (#13592)
* Reinstate caching on /static/plugins/* endpoint except for 404s

* fix struct name and change default behavior for staticFilesHandler
2020-01-08 16:43:59 -04:00
Juho Nurminen
d30f904de9 MM-20627: Create SECURITY.md (#13569)
* Create SECURITY.md

* Fix typo in SECURITY.md

* Update SECURITY.md

Co-Authored-By: George Goldberg <george@gberg.me>

* Update SECURITY.md

Co-Authored-By: George Goldberg <george@gberg.me>

* Update SECURITY.md

Co-Authored-By: George Goldberg <george@gberg.me>

Co-authored-by: George Goldberg <george@gberg.me>
2020-01-08 15:48:01 +02:00
Jesús Espino
464c290e50 Removing certain unneded cluster invalidation messages (#13549)
* Removing certain unneded cluster invalidation messages

* Fixing typo

* Removing channges included in other PR

* Adding doc string to RegisterAllClusterMessageHandlers method

* fixing typos

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-08 11:31:10 +01:00
Scott Bishel
bd480b70f3 Caching removed from post_store.go, remove caching test (#13437)
Automatic Merge
2020-01-07 14:13:56 -05:00
Agniva De Sarker
ecb41c6eb5 MM-21285: Remove environment overrides before config broadcast (#13527)
While sending the config broadcast message across a cluster, we would
include the environment overrides in the config.

We fix this by exposing a config config store method to remove the overrides,
and then calling that before saving the config across the cluster.

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-07 23:21:28 +05:30
Carlos Tadeu Panato Junior
62f77d81aa upgrade DB to 5.19.0 (#13446) 2020-01-07 18:17:07 +01:00
Andy Librian
a4c4437681 Golint fix config (#13544) 2020-01-07 17:00:56 +01:00