Граф коммитов

10285 Коммитов

Автор SHA1 Сообщение Дата
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) 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) 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.
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
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
Christopher Speller
9f46512759 MM-11693 Allow connections to /plugins for interactive message buttons. (#9333)
* Allow connetions to /plugins for interactive message buttons.

* Adding siteurl to exclusions for AllowedUntrustedInternalConnections

* Adding subpath support for allowing interactive message buttons plugin connections.
2018-09-02 09:30:10 +02:00
Harrison Healey
68fdaaa995 Fix store cache invalidation for reactions (#9331) 2018-08-30 10:25:25 -07:00
Harrison Healey
c8e473a789 Invalidate store cache after making changes (#9211)
* Invalidate store cache after making changes

* Address feedback

* Make cache invalidation in stores always use defer
2018-08-30 10:28:58 -04:00
Sudheer
570c52b4cc MM-11710 Add a check to webhook messages to populate username from DM channel for email subject (#9314) 2018-08-30 13:07:36 +02:00
Dmitry Samuylov
effa9d33fc bug fix: after and before search flags should not be inclusive of the selected date (#9327)
* fix for date based flag support to make the after and before flags not inclusive of the selected date

* updated search posts tests using date flags to take into account new non inclusive of the selected date behavior of those flags
2018-08-29 19:44:00 -03:00
George Goldberg
e742ba7d51 Remove testing imports from non-test code. (#9324) 2018-08-29 11:08:03 -07:00
Joram Wilander
9c76d9ba00 Add GetLDAPUserAttributes method to the plugin API (#9326) 2018-08-29 11:07:27 -07:00
Carlos Tadeu Panato Junior
0da5c852f0 add --username in the example for the commands (#9320)
* add --username in the example for the commands

* update per review
2018-08-29 16:57:26 +02:00
Jesús Espino
0291730c2f MM-11270: Forbid react/de-react in archived channels (#9323) 2018-08-29 15:07:37 +02:00
Pradeep Murugesan
7a3cf112c5 9304 added the attachments import to direct post (#9308) 2018-08-29 14:27:44 +02:00
Elias Nahum
c2676d964e translations PR 20180827 (#9317) 2018-08-28 19:52:07 -03:00
Jesús Espino
ae3865b539 MM-10532: Add EnableSyncWithLdapIncludeAuth config (#9319) 2018-08-28 19:49:01 +02:00
Dmitry Samuylov
42806ae965 Feature/search after before on (#9219)
* initial implementation of after, before, on search flags allowing to restrict the search to a specific day or a date range

* missed setting beforeDate in SearchParams in one place

* fixed condition when only flags are used for search without any plain terms

* changed date format used for after/before/on flags to be in ISO8601 format as suggested in PR comments, added a helper function to pad month and day with zeroes allowing the user user either format, with or without leading zeroes

* corrected expected compare to date setting for the TestParseDateFilterToTimeISO8601 test

* fixed a bug for the scenario when you only have the date flags without any terms, added a couple of tests for that scenario

* updated the date filter logic to use parameters to construct the query instead of simply appending strings together, as suggested in the pull request comments

* added search unit test using date flags

* added a helper function to create a test post with a createat date manually set, updated the test for search using date flags to create test posts with different createat dates to be able to better test the functionality

* MM-11817 Add support for after/before/on search flags with Elasticsearch

* add support to search posts to perform the search in context of the client's timezone when filtering by createat date using on: after: before: flags

* updated tests to match the new signature
2018-08-28 13:09:32 -04:00
Christopher Speller
61e27beabc Updating dependancies. (#9303) 2018-08-28 10:05:26 -07:00