Commit Graph

10299 Commits

Author SHA1 Message Date
Jesús Espino
9d73c79def Idiomatic error handling for app/c*.go (#9423) 2018-09-24 13:27:31 +02:00
Jesús Espino
8898d7aab9 Idiomatic error handling for app/e*.go (#9426) 2018-09-24 12:52:29 +05:30
Vasily Naumkin
74c92237c0 Do not force downloading of shared public files (#9412)
I believe we don't need to force downloading of shared public files, because `writeFileResponse` method will compare its MIME type with `MEDIA_CONTENT_TYPES` and output it inline or as attachment automatically.

Usually we are share images and it is much more convenient to see them without downloading.
2018-09-21 08:22:23 -07:00
Joram Wilander
d764b26b52 Fail plugin activation if no web app and server component (#9438) 2018-09-21 08:07:32 -07:00
Jesús Espino
a08df883b4 Move file backend to its own service (#9435)
* Move file backend to its own service

* Moving utils/inbucket to mailservice package
2018-09-20 10:07:03 -07:00
Elias Nahum
f1be975d7a translations PR 20180917 (#9428) 2018-09-20 11:53:10 -03:00
Christopher Speller
3ea33b76f8 Improving token lookup. (#9436) 2018-09-20 10:23:44 -04:00
Hanzei
1463df21a5 Add ChannelId and TeamId to PostActionIntegrationRequest (#9384)
* Add ChannelId and TeamId to PostActionIntegrationRequest

* Add tests
2018-09-19 08:39:36 -04:00
Jesse Hallam
0204c45b7a Revert "disable EnablePublicChannelsMaterialization by default (#9418)" (#9427)
This reverts commit 5786b0d6d5, now that
the feature is safe to enable by default.
2018-09-18 10:53:36 -04:00
Jesús Espino
c2496911c0 Migrate to idiomatic error handling the first half to the app/channel.go (#9413) 2018-09-17 23:10:57 +02:00
Jesse Hallam
6c826e765f materialize PublicChannels without triggers (#9424)
Creating triggers requires SUPERUSER privileges, and is especially
painful on RDS. Pivot to maintaining this denormalized table in code.
2018-09-17 13:25:19 -07:00
Harrison Healey
6c2a5555b8 MM-11700 Clean up handling of user display names for notifications (#9343)
* MM-11700 Clean up handling of user display names for notifications
2018-09-18 00:20:12 +05:30
George Goldberg
ab99f0656f MM-11781: Basic Data Export Command Line. (#9296)
* MM-11781: Basic Data Export Command Line.

* ChannelStore new unit tests.

* TeamStore new unit tests.

* Unit test for new UserStore function.

* Unit tests for post store new methods.

* Review fixes.

* Fix duplicate command name.
2018-09-17 15:51:26 +01:00
Jesse Hallam
5786b0d6d5 disable EnablePublicChannelsMaterialization by default (#9418)
* disable EnablePublicChannelsMaterialization by default

Creating triggers on Amazon RDS seems to reqiure extra privileges. More
investigation is required.

* update model/config.go too
2018-09-17 07:37:46 -07:00
Charles Birk
a755bcdde6 [MM-11860]: Expose slack attachment parsing functions in the model package (#9351)
Refactored parseSlackAttachment functions from https://github.com/mattermost/mattermost-server/blob/master/app/post.go#L312
into model/slack_attachments.go so that plugins have access to them.
2018-09-17 10:15:28 -04:00
Jesús Espino
7226ea7dfb MM-12045: Fix MFA for ldap accounts (#9420) 2018-09-17 09:12:07 -03:00
FurmanovD
517faccc33 MM-11424 Extend bulk import to support themes across teams(#9305) (#9419)
* MM-11424 Extend bulk import to support themes across teams(#9305)

Also added:
Advanced Settings:
+'feature_enabled_markdown_preview'
+'formatting'
Sidebar Settings:
+'show_unread_section'

* MM-11424 (PR review) user teams' theme validator test updated

* MM-11424 (PR review) added test with valid JSON of invalid theme(by structure)

JSON string contains numeric and JSON object fields, not just a correct "string":"string" map
2018-09-17 11:46:06 +01:00
Carlos Tadeu Panato Junior
35c148d255 fixing log messages (#9341)
* fixing log messages

* update per review

* Update notification.go

* Update server.go

* Update notification.go
2018-09-17 09:29:04 +02:00
Jesús Espino
4fb7817610 Migrate to idiomatic error handling the second half to the app/channel.go (#9414) 2018-09-17 08:05:05 +02:00
George Goldberg
fdbb6de3d5 MM-11520: Make entity ID checks consistent across api4. (#9395)
* MM-11520: Make entity ID checks consistent across api4.

* Update tests.
2018-09-14 08:21:05 -07:00
Carlos Tadeu Panato Junior
83a00ae925 Merge release-5.3 2018-09-14 16:31:59 +02:00
Harrison Healey
8afc529753 MM-10573 Add error page if user doesn't authorize Mattermost for OAuth (#9402) 2018-09-14 11:32:25 +01:00
Jesse Hallam
f2ddef9117 MM-11734: better plugin error handling (#9405)
* MM-11734: encode unregistered error implementations as an ErrorString

* MM-11734: test error string handling

* more idiomatic error handling
2018-09-13 11:31:22 -07:00
Jesse Hallam
8b17bf9e42 MM-11886: materialize channel search (#9349)
* materialize PublicChannels table

Introduce triggers for each supported database that automatically maintain a subset of the Channels table corresponding to only public channels. This improves corresponding queries that no longer need to filter out 99% DM channels.

This initial commit modifies the channel store directly for easier code reviewing, but the next wraps an experimental version around it to enable a kill switch in case there are unforeseen performance regressions.

This addresses [MM-11886](https://mattermost.atlassian.net/browse/MM-11886) and [MM-11945](https://mattermost.atlassian.net/browse/MM-11945).

* extract the experimental public channels materialization

Wrap the original channel store with an experimental version that
leverages the materialized public channels, but can be disabled to
fallback to the original implementation.

This addresses MM-11947.

* s/ExperimentalPublicChannelsMaterialization/EnablePublicChannelsMaterialization/

* simplify error handling

* move experimental config listener until after store is initialized
2018-09-13 13:47:17 -04:00
Harrison Healey
fd21e53365 MM-12007 Add max dimensions to emoji images (5.3) (#9407) v5.3.1-rc1 v5.3.0 v5.3.0-rc5 v5.3.1 2018-09-13 19:10:10 +02:00
George Goldberg
0a5f792d2d MM-11230: Make permissions checks in commands failsafe. (#9392)
Also add additional unit tests to make sure the permissions tests are
completely solid.
2018-09-12 10:32:05 -04:00
Carlos Tadeu Panato Junior
fba0f8e8b2 Merge release-5.3 2018-09-12 15:07:33 +02:00
Jesús Espino
e32581aef3 MM-11725: Add specific autocomplete endpoint for search autocomplete (#9337) 2018-09-11 22:45:31 +02:00
alezakos
d585f9d9a3 MM-11895: Don't crush user-provided GET parameters on slash command URLs (#9372) 2018-09-11 15:58:57 -04:00
Elias Nahum
7d60bc8cf5 translations PR 20180911 (#9397) v5.3.0-rc4 v5.3.0-rc3 2018-09-11 21:50:39 +02:00
der-test
14928ceb74 Minor grammar & spelling fixes (#9325)
* Minor grammar & spelling fixes

Minor grammar & spelling fixes

* Harmonizing error messages

First step to harmonize the error messges by using three formulations
that basically mean the same.

* Changed string after feedback.

* Change after feedback

* Removed typo

Head hit keyboard or something...

* Updated second occurence of an already changed string

Changed ssecond occurence of "Unable to know if the file exists. An error ocurred when trying to check file existence."
2018-09-11 12:41:46 -04:00
Jesse Haka
4e33aeb581 fix s3 memory usage (#9373) 2018-09-10 19:35:01 +02:00
Carlos Tadeu Panato Junior
1f87596e75 Merge release-5.3 2018-09-10 16:13:21 +02:00
Christopher Speller
a8d116b381 Speed up search results post selection. (#9380) 2018-09-10 15:20:01 +02:00
Christopher Speller
bb605a6b91 Changing comparison method. (#9383) 2018-09-10 15:19:29 +02:00
Harrison Healey
435ce3df4b Stop re-wrapping password reset email error in another error (#9382) 2018-09-10 07:42:59 -04:00
George Goldberg
504591e7d6 MM-11882: Remove all users from a channel via CLI. (#9381) 2018-09-10 07:42:15 -04:00
Harrison Healey
e39ab5c7dc MM-12007 Add max dimensions to emoji images (#9379) 2018-09-10 07:38:04 -04:00
Harrison Healey
0027d99855 MM-11855 Add App.HTTPService to allow mocking of HTTP client (#9359)
* MM-11855 Add App.HTTPService to allow mocking of HTTP client

* Initialize HTTPService earlier
2018-09-07 09:24:18 -04:00
George Goldberg
72258266aa MM-11649: Fix caching issue in channel API endpoints. (#9345)
This fixes an issue where the cached Channel objects would contain data
from a failed update when the update to the database failed.
v5.3.0-rc2
2018-09-06 23:41:19 +02:00
Chetanya Kandhari
2910007033 Fix typo (#9347) 2018-09-05 08:26:03 -04:00
Carlos Tadeu Panato Junior
54cb151d88 Add preparatory upgrade code for 5.4.0 (#9355)
* Add preparatory upgrade code for 5.4.0

* add migration from bad merge
2018-09-05 00:11:14 +02:00
cpanato
4cf6913c1c Merge remote-tracking branch 'upstream/release-5.3' into release-5.3-daily-merge-20180904 2018-09-04 23:27:39 +02:00
Carlos Tadeu Panato Junior
d2190527ea Uncomment upgrade for 5.3.0 (#9354)
* Uncomment upgrade for 5.3.0

* add missing version
v5.3.0-rc1
2018-09-04 15:42:43 +02:00
n1aba
50af3a19a2 MM-11703: Update incoming and outgoing webhook description to 500 characters (#9265)
* MM-11703: Update incoming and outgoing webhook description to 500 characters

* MM-11703: Add upgrade code

* MM-11703: Remove MAX_DESCRIPTION_LENGTH constants

* MM-11703: GOFMT

* MM-11703: Move upgrade code to version 5.3

* MM-11703: Comment back upgrade to 5.3.0

* MM-11703: Add API errors back

* MM-11703: Copy-Paste
2018-09-04 13:24:41 +02:00
Jesse Hallam
b98ef658ad MM-11720: disable loading plugin specific config from the environment (#9334)
There are numerous issues here, including some non-determinism in the viper library (fixable) and some annoying behaviour regarding periods in keys, often used by plugin ids (fix unknown). Let's defer the handling of same until we can get our config loading library to do what we need it to do vs. having to hack around viper all the time.
2018-09-03 17:08:25 +02:00
Jesús Espino
72560311a2 MM-11728: Avoid Archived channels editions throught Patch (#9335) 2018-09-03 17:07:51 +02:00
cpanato
30fa6eca69 Merge remote-tracking branch 'upstream/merge-release-5.3-20180903124813' 2018-09-03 15:07:17 +02:00
Carlos Tadeu Panato Junior
153b119092 Merge release-5.3 2018-09-03 14:48:14 +02:00
Daniel Schalla
531897b1f0 add megacheck as makefile target (#9288)
Fix code issues in channel_test.go

Fix Channel Test Issues detected by Megacheck

Fix API Emoji Test Issues detected by Megacheck

Fixed API Issues Reported by Megacheck

Fixed App issues reported by megacheck

Remaining fixes

removed test added by mistake from old HEAD

gofmt

Store Fixes

simplified returns

Fix test for multi member channel delete

revert to delete unused function
2018-09-03 14:08:40 +02:00