Commit Graph

10842 Commits

Author SHA1 Message Date
Harrison Healey
cbcfef25e5 MM-14574 Intercept log messages from local image proxy (#10668)
* MM-14574 Switch willnorris/imageproxy to fork

* MM-14574 Intercept log messages from local image proxy

* Revert "MM-14574 Switch willnorris/imageproxy to fork"

This reverts commit 046ab5c421.

* Update willnorris/imageproxy
2019-04-24 11:55:37 -04:00
Jesús Espino
7c7ff93d97 Migrating compliance store to sync by default (#10660)
* Migrating compliance store to sync by default

* Addressing PR review comments
2019-04-24 11:50:25 +01:00
Jesús Espino
4ae38d00a8 Migrating cluster discovery store to sync by default (#10665)
* Migrating cluster discovery store to sync by default

* Addressing PR review comments
2019-04-24 12:36:56 +02:00
Andres Orozco
357065e202 [MM-15121] Migrate "WebHook.GetIncomingList" to Sync by default (#10666)
* SyncStore: migrate WebHooks.SaveIncoming method to Sync

* MM-15121 Migrate WebHook.GetIncomingList to Sync by default

* MM-15121 Migrate WebHook.GetIncomingList to Sync by default - add review changes

* Revert "SyncStore: migrate WebHooks.SaveIncoming method to Sync"

This reverts commit 626a7d1a25.
2019-04-24 09:32:30 +01:00
Andres Orozco
105e8647f8 MM-15116 Migrate WebHook.SaveIncoming Method to Sync by default (#10663)
* SyncStore: migrate WebHooks.SaveIncoming method to Sync

* MM-15116 Migrates the WebHook.SaveIncoming method to Sync by default

* MM-15116 Migrate Webhook.SaveIncoming to Sync by default - fix minor typo

* MM-15116 Migrate WebHook.SaveIncoming to sync -  update test case
2019-04-24 09:30:41 +01:00
Ali F
6f8577b4c1 MM-14246 - Plugin framework: support transactional semantics with KV Store (#10634)
* MM-14246 - Plugin framework: support transactional semantics with KV Store

Rename old, new variable names

Moving New function to the bottom

* Made CompareAndUpdate sync, updated tests

* Removed going through channel in CompareAndSetPluginKey

* Inserting new key when oldValue is nil to KVCompareAndSet

* Updated error text to include CompareAndSet
2019-04-23 10:35:17 -07:00
Sheshagiri Rao Mallipedhi
446c6d452e MM-12795: remove @ from push notifications (#10298)
* remove @ from push notifications

* prepend @ when display name is set to username

* fix @ in username

* fix username getting prefixed in push notifications
2019-04-23 12:20:19 -04:00
Gabe Jackson
be4b473aee Move to the mattermost/go-i18n fork (#10669)
This change is being made to address an issue where the go-i18n
translation library would result in partial-translations when a
given language dictionary was missing a given plural keyword. The
improvement made here leads the translation library to try an
'other' keyword lookup if the first plural keyword fails to have
a value.

This change was not accepted upstream due to concern regarding
changing the behavior, so we are using a fork at this time to
address the issue.
2019-04-23 09:33:42 -04:00
tengis b
0d1c69927f Migrate PermanentDeleteOutgoingByChannel to Sync (#10673) 2019-04-23 08:40:41 -04:00
Siyuan Liu
eaef1952b0 [MM-15183] Migrate "WebHook.SaveOutgoing" to Sync (#10675) 2019-04-23 16:39:59 +08:00
Harrison Healey
2b6691e5cc MM-14741 Add default option to post action dropdown (#10659) 2019-04-22 08:57:54 -07:00
Jesse Hallam
7031846243 MM-15064: allow running with future minor db versions (#10636)
* MM-15064: allow running with future minor db versions

This is to support running another community cluster that stays on the most recent stable version while we test upcoming versions.

During the past few releases, we have committed to not making backwards incompatible schema changes across minor versions. This means that a 5.x server can run against any 5.y schema, y >= x. (It will upgrade to x if y < x).

* check errors on incoming versions vs. Must/panic

* fix TestSaveSchemaVersion
2019-04-22 11:30:58 -04:00
Siyuan Liu
434f343f69 [MM-15122] Migrate "WebHook.GetIncomingByTeam" to Sync by default (#10631) 2019-04-22 11:29:55 -04:00
Syerikjan Kh
1e92646646 GH-10617 SyncStore: GetIncomingByChannel to sync (#10633)
* GH-10617 GetIncomingByChannel to sync

* GH-10617 using async calls explicitly

* GH-10617 order of assignment change

* Update store.go

* Update store.go

* Update store.go

* GH-10617 fmt fix
2019-04-22 11:28:07 -04:00
Tyler Ramer
99a8370742 Use gzip for API responses [MM-11426] (#10602)
* Use gzip for API responses [MM-11426]

- Update api4/handlers to use gziphandler wrapper if api configured to
use gzip
- Add test to ensure `Content-Encoding` header is set if `WebserverMode=="gzip"` and `Accept-Encoding="gzip"` present in http request

Authored-by: Tyler Ramer <tyaramer@gmail.com>

* WIP: refractor handlers_test

Clean up, include gzip tests for all functions in handlers

Authored-by: Tyler Ramer <tyaramer@gmail.com>

* fixup! WIP: refractor handlers_test

* fixup! fixup! WIP: refractor handlers_test
2019-04-22 08:22:08 -07:00
Martin Kraft
1b9d937962 MM-15201: Don't check for non-members unless the channel is group-constrained. (#10657) 2019-04-20 19:53:50 +02:00
Fede
17092e7e48 [MM-15117] Migrate "WebHook.UpdateIncoming" to Sync by default (#10637)
* SyncStore: Migrate Webhooks.UpdateIncoming method to Sync

* Changes requested by @jespino
2019-04-18 13:03:59 +01:00
Eli Yukelzon
6cc36ab176 [MM-14890] Logs endpoint always returns an empty line (#10559)
* fixed new line being returned in logs, improved the test

* improved the EOL check

* Fixed var shadowning
2019-04-18 10:16:49 +01:00
Martin Kraft
84a59ddb39 MM-14417: Messaging for mentions of users who are not in associated channel groups. (#10594)
* MM-14417: Adds support for out-of-channel notifications of users who are not in associated groups of group-constrained channels.

* MM-14417: Fix for mobile backwards compatibility.
2019-04-17 10:44:45 -04:00
Martin Kraft
762c257277 MM-14754: Prevent team invites or tokens from working for group-constrained teams. (#10626) 2019-04-17 10:41:47 -04:00
Daniel Schalla
794c841f72 Add diagnostics for DisableLegacyMFA (#10566) 2019-04-17 15:48:11 +02:00
Akira Fujimoto
5a287f6ad3 Fix typo in build/README.md (#10307) 2019-04-17 06:29:39 +02:00
Jesús Espino
13fba10eb8 SyncStore: Migrate Webhooks.GetIncomming method to Sync (#10613) 2019-04-16 10:16:30 -07:00
Miguel de la Cruz
83a0e965d3 [MM-15126] Adding terms of service to the login response (#10625) 2019-04-16 17:59:07 +01:00
Jesús Espino
12c50eb830 Initial migration of the store to be sync (#10592)
* Migrating audit store

* Final migration example for the audit store

* async example

* Ending migration

* Removing Async helper

* Fixing tests

* Fixing govet problems with the StoreResult instanstiation
2019-04-15 22:53:52 +02:00
Daniel Schalla
957ec1388b [MM-14381] Fix brittle MFA Login Successful Test (#10565)
* Fix brittle MFA Login Successful Test

* Fix 2FA Conversion issue

Co-Authored-By: DSchalla <daniel@schalla.me>

* Unify naming
2019-04-15 18:40:14 +02:00
Christopher Speller
47c527ec2a Documenting OnConfigurationChange being called before OnActivate. (#10597) 2019-04-15 08:21:12 -07:00
Miguel de la Cruz
4c52f91997 Expose GroupConstrained flag where needed and add tests (#10604) 2019-04-15 17:13:11 +02:00
Carlos Tadeu Panato Junior
5db62c20c5 add jenkinsfile to build branch master or release-branches (#10567) 2019-04-15 12:39:15 +02:00
George Goldberg
a69ce6d64d MM-14845: Updates default permissions. (#10590) 2019-04-12 18:00:57 +01:00
George Goldberg
e5e1c5c027 Remove no longer used enterprise string to fix build. (#10600) 2019-04-12 17:24:54 +01:00
Martin Kraft
100433f4cc MM-14757/14758: Restricts deleting team and channel members if the team or channel is group constrained. (#10553)
* MM-14757/14758: Update APIs to reject removals from group-constrained teams.

* MM-14757/14758: Tests API changes.

* MM-14757/14758: Allow users to leave channals and teams.

* MM-14757/14758: Updates translation key order.

* MM-14757/14758: Adds user to team before setting it to group-constrained b/c of new add restrictions.
2019-04-12 10:15:46 -04:00
Lev
f93ba3cd23 MM-14795 Added "from_webhook" to protected props in DoPostAction (#10593)
Per @hanzei's request https://github.com/mattermost/mattermost-server/pull/10546#issuecomment-481997493
https://mattermost.atlassian.net/browse/MM-14795
2019-04-11 16:35:29 -07:00
Jesús Espino
57a3281fea Moving the creation of the new bot permissions to permissions migrations (#10588) 2019-04-11 19:03:05 +02:00
Jesús Espino
5dee75553d MM-15006: Returning informative errors on config validation (#10585)
* MM-15006: Returning informative errors on config validation

* Adding new unit test verifying the validation and correct response
2019-04-11 08:57:25 +02:00
Lev
2e7080e68d Mitigated MM-14084 - Handling of PostAction Update props (#10546)
* Mitigated MM-14084 - Handling of PostAction Update props. Also fixed MM-14795.

- Added logic to preserve the original post's Props in their entirety
  if integration's Update.Props == nil
- Removed mandatory setting of "from_webhook"
- TODO: ?? Extend the list of protected props?

* Preserve IsPinned, HasReactions

- and so much for the tests, fixed a previous bug where UpdatePost was
not in the right place.

* Improved comments and names, as per feedback

* Added test for IsPinned, HasReactions as perfeedback
2019-04-10 16:41:29 -07:00
Harrison Healey
a5501cf3f8 MM-15302 Don't get post embeds with link previews disabled (#10587)
* MM-15302 Don't get post embeds with link previews disabled

* Enable link previews for other metadata tests
2019-04-10 15:48:15 -04:00
Christopher Speller
41d117c37b MM-14617 Dependency upgrades and adding modules support. (#10517)
* Dependency upgrades and adding modules support.

* Commenting out file tests playload verification portion.

* Fixing viper.

* Fixing hclog.
2019-04-10 07:56:17 -07:00
Martin Kraft
bd8a54bb08 MM-14811: Accepts Server rather than App in account migration interface registration. (#10568) 2019-04-10 06:04:07 -04:00
Joram Wilander
2d4d19837b Remove LogSettings.FileFormat after it was accidentally added back (#10569) 2019-04-09 12:42:24 -04:00
Carlos Tadeu Panato Junior
6bcd30d53a fix order (#10580) 2019-04-09 16:29:33 +02:00
Fernando Correa Neto
02bd35247b [MM-14779] Investigate flaky TestExportGMandDMChannels (#10534)
* fix flaky test by sorting by Type and also change helper to increase
precision in CreateAt

* better strategy is to get a smaller number

* user nanonseconds as milisenconds proved to be a bit problematic for
unit tests

* revert changes in helper function and create posts in a more controled way

* use the original value

* make post instantiation more clear
2019-04-09 09:47:41 -04:00
Martin Kraft
7bde0378cd MM-14753: Verifies that user can join teams and channels in spite of group constraints. (#10529)
* MM-147753: Verifies that users are allowed to be members of a team or a channel, based on group constraints, prior to allowing the API to add them.

* MM-14753: Allow methods to return meaningful results for deleted teams or channels.

* MM-14753: Renames methods to differentiate from permissions and other team and channel restrictions.

* MM-14753: Only check if users are team/channel members if team/channel is group constrained.

* MM-14753: Updates test function names.

* MM-14753: Changes a few method signatures.

* MM-14753: Small refactor and adds missing returns.

* MM-14753: Changes method names from Get* to Filter* name prefixes.

* MM-14753: Renames error variables.

* MM-14753: Updates method names for consistency with join table names.

* MM-14753: Adds case for non AppError return.

* Update i18n/en.json
2019-04-09 07:09:57 -04:00
Jesús Espino
43fa7e0548 Adding the client part of the new endpoint to invalidate email invites (#10561) 2019-04-09 11:55:39 +02:00
Jesús Espino
b1f73109de Removed confusing and obsolete comment (#10549) 2019-04-09 10:31:22 +01:00
James Vasky
1a102e13c8 MM-12358 Create CLI command "command modify" (#10538)
* Added ability to modify a command using the CLI

* Added ability to modify a command using the CLI

* Added TestModifyCommand to command_test.go and unit tests for new modify command

* Added ability to modify a command using the CLI

* Added TestModifyCommand to command_test.go and unit tests for new modify command
2019-04-09 10:27:15 +01:00
Carlos Tadeu Panato Junior
40b97a1a4f add check i18n en.json to the pipeline (#10557) 2019-04-09 11:22:54 +02:00
Jesús Espino
9fa6b093f3 Fixing permissions checks where related to join public channels (#10511)
* Fixing permissions checks where related to join public channels

* Addressing PR review comments

* Fixing bug

* Adding new tests

* Addressing PR review comments
2019-04-08 11:10:16 +02:00
Jesús Espino
9b73d34eaa Fixing translations (#10560)
* Fixing translations

* Add elasticsearch translations

* Adding more translations
2019-04-05 17:04:25 +02:00
happygaijin
ba34b4607c MM-14575 - Automatically serve static files for plugins (#10476)
* MM-14575 - Automatically serve static files for plugins
* Added static handler for plugin public files
* Added StaticFilesPath method to Environment for use by MainRouter
* Added "static_files" property to Manifest Server
* Added unit tests for these changes

* MM-14575: Adding comment for cache control value

* MM-14575: Moved Static Plugin Request handler to plugin_requests
* Updated testing

* MM-14575: Removing the StaticFiles from Manifest Server

* MM-14575: Removing static files from test

* MM-14575: Updating static files test

* MM14575: Removing cache directive from plugin static files

* MM14575: Moving plugin public directory to root

* MM-14575: Updating tests for changed public directory

* MM-14575: Moved compileGo to a common utils package for tests

* MM-14575: Moving plugins initialization to InitPlugins find in tests

* Update utils/test_files_compiler.go

Adding Copyright header

Co-Authored-By: happygaijin <happygaijin@users.noreply.github.com>

* MM-14575: Consistent usage of static vs public name

* Removing spurious newline

* Comment typo

Co-Authored-By: happygaijin <happygaijin@users.noreply.github.com>

* Removing spurious new line

Co-Authored-By: happygaijin <happygaijin@users.noreply.github.com>

* MM14575: Adding a test to make sure only public files can be requested

* MM-14575 Adding a test for redirects on public files
2019-04-05 10:35:51 -04:00