Commit Graph

10996 Commits

Author SHA1 Message Date
Giorgos Christos Dimitriou
2e79ae9636 Change the implementation of GetAll() in preference_store.go to ret… (#10926)
* Change the implementation of GetAll() in `preference_store.go` to return an
object from `model` and a *model.AppError.
Change the Interface in `store.go` to accomodate for the change
Change the test that called the GetAll() function

* Rename the result variable to preferences so it makes more sense.
Use assertions to keep the test consistent

* Generate the correct mocks after the code changes

* Remove redundant conditions

* Address govet errors

* Resolve conflicts with master's new changes

* Fix Save() function according to the new changes in master (Got
overwritten with the previous commit)

* Change the assertions to have the same format as commit 2d97f01
2019-06-03 07:25:04 -04:00
Woolim Cho
d1f81842a5 [MM-15799] Migrate "Session.PermanentDeleteSessionsByUser" to Sync by default (#11038) 2019-06-03 13:22:02 +02:00
Christopher Speller
d88de07b9d Preventing bad email configuration from failing personal access token creation. (#11027) 2019-06-01 08:12:03 +02:00
Rodrigo Villablanca Vásquez
e20d91b00e Fix #10975. GetEtag is sync now (#11011)
* Fix #10975. GetEtag is sync now

* Revert of modifications to go.mod and go.sum
2019-05-31 17:58:24 -04:00
Jesse Hallam
719412c1a0 MM-15956: consistent params for config migrate (#11024)
This changes the syntax of the config migrate command from:

    mattermost config migrate --from <from config> --to <to config>

to:

    mattermost config migrate <from config> <to config>

making it more consistent with our other CLI commands.
2019-05-31 17:04:59 -04:00
Jesús Espino
9e17274741 Migrate Store groups to sync by default (GroupSyncable methods) (#11003) 2019-05-31 18:27:56 +02:00
Miguel de la Cruz
74997a126e Change ES trace config type from boolean to string (#11019) 2019-05-31 17:25:11 +01:00
GianOrtiz
ec20d3a844 MM-15794 Migrate "Session.Get" to Sync by default (#10990) 2019-05-30 23:22:19 +02:00
Rodrigo Villablanca Vásquez
9fa1622fc3 Fix #10963: GetDirectPostParentsForExportAfter is sync now (#11009) 2019-05-30 23:19:14 +02:00
Jesús Espino
76e00b406e Migrate Groups store to sync by default (GetGroups and Counts) (#10998) 2019-05-30 20:39:43 +02:00
Jesús Espino
b3118ce605 Migrate Groups store to sync by default (Add/Remove Channel/Team Members) (#10997)
* Migrate Groups store to sync by default (Add/Remove Channel/Team Members)

* Addressing PR review comments
2019-05-30 20:38:22 +02:00
Jesús Espino
17e6297a15 Adding Content-Type header to the OAuth complete endpoint (#10961) 2019-05-30 13:38:21 -04:00
Jesús Espino
4de81fa94c MM-15835: correct errors and content types for oauth api calls (#10999)
* MM-15835: correct errors and content types for oauth api calls

* Addressing PR review comments
2019-05-30 13:23:26 -04:00
Evan do Carmo
ae6fed827a #10939 Migrate "Session.Save" to Sync by default (#10944)
* Migrate "Session.Save" to Sync by default

* fixing unreachable code

* removing shadowing

*  whitespace changes, refactoring flow control logic

* removing unnecessary whitespace
2019-05-30 12:10:24 -04:00
Miguel de la Cruz
6aba17ff9d [MM-15637] Add Trace config option to the Elasticsearch block (#11008) 2019-05-30 16:48:19 +01:00
Evan do Carmo
cee1e36859 MM-15846 migrating get posts to sync by default (#10994)
* migrating get posts to sync by default

* flow control and style changes

* style changes, error checking

* pulling master down

* counting missed cache, not hit

* fixing bad conflict resolution

* forcing rebuild
2019-05-30 10:44:33 -04:00
Evan do Carmo
427effcd5c MM-15843 migrating post.GetSingle() to sync by default (#10992) 2019-05-30 14:43:45 +02:00
Evan do Carmo
8ff58a07bd MM-15842 making post.update() sync by default (#10991)
* making post.update() sync by default

* fixing style issues

* style changes

* fixing variable name
2019-05-30 10:35:46 +02:00
Jesper Hansen
58363d3455 [MM-15194] Store: Migrate Emoji.Save to Sync as default #10642 (#10955)
* Store: Migrate Emoji.Save to Sync as default #10642

* Store: use require.Nil helper function to assert nil
2019-05-29 14:32:54 -04:00
Evan do Carmo
9f4c703f1e MM-15847 migrating getFlaggedPosts to sync by default (#10995) 2019-05-29 18:05:59 +02:00
Evan do Carmo
28d668cd91 MM-15848 migrating getFlaggedPostsForTeam to sync by default (#10996) 2019-05-29 16:48:05 +02:00
Ishank Gulati
3b25e09b99 [GH-10866] Preferrence.Save - Remove preference length return arg (#10962) 2019-05-29 09:54:56 -04:00
Evan do Carmo
42ac975c0e migrating perm delete by channel to sync (#10993) 2019-05-29 14:55:03 +02:00
Jesse Hallam
ca15690685 MM-15371: allow config show --json (#10918)
* MM-15371: allow config show --json

Mattermost Cloud will (temporarily?) rely on `mattermost config show` to dump the configuration for an active cluster installation. This adds support for a `--json` flag to dump the config in a format more suitable for programmatic consumption.

* indent config show --json

* ignore coverage lines too
2019-05-28 22:18:17 -05:00
Lev
e86adce31e MM-15706: disable PluginHealthCheck_RPCPingFail test (#10988) 2019-05-28 14:14:13 -07:00
Daniel Schalla
f3801d7db5 Dont expose any information about the user status on login failure (#10925) 2019-05-28 11:26:02 -07:00
Elias Nahum
9dc14d63b7 Trim leading and trailing spaces for search terms (#10989) 2019-05-28 13:04:12 -04:00
Christopher Speller
f7cda71bbd Preventing failed plugins webapp components from being served. (#10953) 2019-05-28 10:01:02 -07:00
Martin Kraft
b7fcddb0fc MM-15784: Prevents non-private channels from being group-constrained … (#10950)
* MM-15784: Prevents non-private channels from being group-constrained via CLI.

* MM-15786: Fixes tests.
2019-05-28 10:55:54 -04:00
Jesús Espino
bb2e52ee68 Migrate Groups to not use the Layered store (#10946) 2019-05-28 15:17:10 +01:00
Bolarinwa Balogun
78b525df89 [MM-15301] Migrate "Preference.IsFeatureEnabled" to Sync by default (#10945)
* [MM-15301] Migrate "Preference.IsFeatureEnabled" to Sync by default

* Remove else clause from 'IsFeatureEnabled'
2019-05-28 15:04:24 +01:00
Bolarinwa Balogun
bdcee4d979 MM-15796 Migrate "Session.GetSessionsWithActiveDeviceIds" to Sync by default (#10954)
* MM-15796 Migrate "Session.GetSessionsWithActiveDeviceIds" to Sync by default

* Change API Call to use Sync approach
2019-05-28 15:55:04 +02:00
Woolim Cho
d9969613f7 Migrate Preference.DeleteCategory to Sync by default (#10927) 2019-05-28 04:02:38 -07:00
Jesús Espino
fb237cc624 Migrate User.Update method to sync by default (#10942) 2019-05-28 09:40:29 +02:00
Angela Chang
8e6a158449 [MM-8421] Special PR to have parseImages return nil when format is tiff (#10928) 2019-05-27 22:20:10 +02:00
Bolarinwa Balogun
674b6f2285 [MM-15803] Migrate "Session.AnalyticsSessionCount" to Sync by default (#10948)
* [MM-15803] Migrate "Session.AnalyticsSessionCount" to Sync by default

* Use Explict Async for sessionChan in analytics.go
2019-05-27 18:54:46 +02:00
Andres Orozco
ff0d3ab00b MM-15354: Migrate Channel.Save to sync by default (#10871)
* MM-15354: Migrate Channel.Save() to sync by default

* MM-15354: fix unchanged Channel().Save() methods

* fix typo

* fix nil reference bug and update tests for channels

* fix err shadowing bug

* MM-15354 fix support for sync version of Save
2019-05-27 17:54:04 +02:00
Woolim Cho
d28f56c61e Migrate Preference.DeleteCategoryAndName to Sync by default (#10940) 2019-05-27 11:40:49 -04:00
Saturnino Abril
28b057c972 add /test post command to post a message as different user to a channel/team (#10798) 2019-05-27 10:21:49 -04:00
Ishank Gulati
fb6c1debf0 [MM-15296] Migrate "Preference.Save" to Sync by default (#10866)
* response format changes

* Generated mocks
Fixed all references of Preferences.Save

* Remove old code from store.go (incorrect merge)

* Review change - Add validations on count and error

* Review change - return from root level

* Review change - return 0 as nil value for int

* fix initialisation of err in preference_store
2019-05-26 15:06:33 +02:00
Tsilavina Razafinirina
c05cf5b033 [MM-11287] Add support for plus sign and period/dot in custom URL schemes (#9155) (#10852) 2019-05-25 21:47:06 +02:00
Daniel Schalla
2d97f01781 [MM-15639] Add config setting to explicitly define which IP headers are trusted (#10907)
* Add config setting to explicitly define which IP headers are trusted

* fix variable shadowing

* Optimize code flow; Add Ratelimit test for header set

* Extend Ratelimit tests

* Add additional unit tests

* Structured logging
2019-05-24 20:22:13 +02:00
Martin Kraft
e8af4872c6 MM-15422: Adds new parameters for retrieving pages of channels. (#10903)
* MM-15422: Adds new parameters for retrieving pages of channels and searching channels.

* MM-15422: Appends excluded channel names with defaults. Adds separate struct for data-tier option parameter.
2019-05-24 11:28:42 -04:00
Jesús Espino
124b371312 Add support for tracing in LDAP (#10920) 2019-05-24 09:55:07 -04:00
Jesús Espino
1269db8691 Migrate User.PermanentDelete to Sync by default (#10876) 2019-05-24 15:16:15 +02:00
Jesús Espino
5a8c07412b Fixing Elasticsearch indexing (#10919) 2019-05-24 14:46:46 +02:00
farhadab
6158adb5b4 [MM-15305] Migrate Preference.CleanupFlagsBatch to Sync by default (#10858)
* [MM-15305] Migrate Preference.CleanupFlagsBatch to Sync by default

* clean up code in CleanupFlagsBatch
2019-05-24 09:46:07 +02:00
Andres Orozco
88005fbf54 MM-15662: Rename "CreateBotAccounts" config.json setting to "EnableBotAccountCreation" (#10875)
* MM-15662 change conflig flag to EnableBotAccountCreation

* undo changes to i18n

* MM-15662: Change config flag for bot creation

adds newline to i18n

* MM-15662 Update diagnostics.go to use new config flag
2019-05-23 13:03:22 -07:00
Christopher Poile
693d11304b * stop exposing plugin's SettingsSchema in api/v4/plugins/webapp (#10911) 2019-05-23 12:34:59 -07:00
Harrison Healey
869e8eae26 MM-15542 Change getPostsBefore/After to include all posts in each thread (#10859)
* MM-15542 Add new tests for GetPostsBefore and GetPostsAfter

* MM-15542 Change getPostsBefore/After to include all posts in each thread
2019-05-23 15:19:49 -04:00