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

11460 Коммитов

Автор SHA1 Сообщение Дата
sowmiyamuthuraman
45601bb6dc Fix. Replace t.fatal() calls to testify assert/require calls (#12084) 2019-09-09 20:10:17 +02:00
Nikhil Ranjan
ec803ada0a Converting to structured logging the file jobs/schedulers.go (#12122)
* Converting to structured logging the file jobs/schedulers.go

* merge mlog warn and error in single error
2019-09-09 18:53:33 +02:00
Phillip Ahereza
8a27ec5749 [MM-18323] Migrate tests from "app/authorization_test.go" to use testify (#12078)
* updated test case to use testify

* change test from require to assert

* Update app/authorization_test.go

Co-Authored-By: Jesús Espino <jespinog@gmail.com>
2019-09-09 13:43:17 +02:00
Rajat Varyani
2b18ebe2cf [MM-18319] Replace t.Fatal with assert.Equal (#12082) 2019-09-09 13:32:30 +02:00
scott lee davis
98f7bdcb43 MM-14827 don't kill STDOUT for the server process (#10828) 2019-09-06 19:08:39 +02:00
Joram Wilander
50e97bd9d3 MM-18081 Except bots from team email domain restrictions (#12041)
* Except bots from team email domain restrictions

* Fix style
2019-09-06 10:55:55 -04:00
Arshdeep Singh Chimni
adb1a98760 Convert tests in "app/plugin_hooks_test.go" to use assert/require (#12061)
* change t.Ftal to require

* remove t.errorf

* fix build error

* adjust for custom error

* fix TestUserWillLogIn_Blocked

* address pr comments
2019-09-06 13:24:38 +02:00
Miguel de la Cruz
1a9a2b1430 [MM-17219] Return an empty list instead of null when no teams (#11904) 2019-09-06 13:12:32 +02:00
Jesús Espino
2719c781ed Convert app/webhooks_test.go t.Fatal calls into assert/require calls (#12039)
* Convert app/webhooks_test.go t.Fatal calls into assert/require calls

* simplified by repetition

* Addressing PR review comments
2019-09-06 12:52:51 +02:00
threepwood-mm
f9d9dd8b60 [MM-14521] New endpoint to validate site urls (#11944) 2019-09-06 12:52:14 +02:00
Jesse Hallam
451982f9d3 improved OnDeactivate handling (#11988)
* Deactivate plugins in parallel to improve shutdown time
* Give plugins at most 10s to handle OnDeactivate before forcefully terminating
2019-09-05 17:27:36 -03:00
Michael Kochell
9d937e7f1d bump jira plugin version to 2.1.1 (#12045) 2019-09-05 10:46:10 -07:00
Jesús Espino
08d3f3219d Converting to structured logging the file services/mailservice/mail.go (#12038)
* Converting to structured logging the file services/mailservice/mail.go

* Using snake_case instead of CamelCase

* Addressing PR review comments
2019-09-05 17:20:58 +02:00
Carlos Tadeu Panato Junior
0ddc5f4a32 upgrade db to 5.15 (#11918) 2019-09-05 12:50:40 +02:00
Woolim Cho
b9a3c2e90e MM-10272: Add a count for pinned posts header icon (#11840) 2019-09-04 13:41:29 +02:00
Guillermo Vayá
5a477a617a [MM-17578]Default download link to anchor for apps (#11931) 2019-09-04 12:25:36 +02:00
Rodrigo Villablanca Vásquez
65f03de1ee [MM-19711] - Get plugin configuration without removing secrets (#11928)
* Method GetUnsanitizedConfig() exposed to API (Plugin) interface and his implementations

* improvements with some suggestions

* Fix documentation (final period added)

Co-Authored-By: Ali Farooq <25732808+ali-farooq0@users.noreply.github.com>

* Added some test for Plugin.GetConfig and Plugin.GetUnsanitizedConfig

* Removed empty lines
2019-09-03 18:41:52 -04:00
Ankit R. Gadiya
5aa24aedc8 MM-16809: Added EnsureChannel Helper (#11852)
This PR adds EnsureChannel helper analogous to EnsureBot helper which creates a new channel if not exists and update the meta data of the channel if exists. Also, it will throw error
if the type of existing channel do not match the type of new channel.
2019-09-03 22:18:08 +02:00
Jesse Hallam
8afbe9c6a4 MM-18167: fix KV* helpers error handling (#12023)
* MM-18167: fix KV* helpers error handling

Returning a `nil` `*model.AppError` does not make a `nil` `error`
interface. As a consequence, all of the KV* helper methods would always
appear to fail, even if the underlying API call was successful.

Fix this mismatch by explicitly assigning `appErr` in the helpers and
only ever returning a `nil` `error` interface. Extend unit tests to
achieve 100% coverage of the associated files.

In the long run, we must change all function signatures to return the
`error` interface instead of the abomination that is returning
`*model.AppError` today.
2019-09-03 22:17:20 +02:00
Claudio Costa
8677596c0d [MM-17919] Add permission check for guest users before sending a /msg command (#11987)
* Add permission check for guest users before sending a /msg command

* Remove unnecessary check for IsGuest
2019-09-03 22:11:55 +02:00
Joram Wilander
d6700e3b40 Do not count deleted channels when checking max channel limit (#12021) 2019-09-03 15:44:45 -04:00
Joram Wilander
c91bcd130d MM-18126 Respect show full name config setting in push and email notifications (#11996)
* Respect show full name config setting in push and email notifications

* Style fix
2019-09-03 10:33:49 -04:00
Carlos Tadeu Panato Junior
f76fdc99d8 when creating the go mod replace git.apache.org/thrift.git to github.com/apache/thrift (#12033) 2019-09-03 14:56:44 +02:00
jfrerich
031cf78c93 [MM-15886] Don't send {"status":"OK"} json response if mobile… (#11982) 2019-08-30 16:57:51 -05:00
Miguel Alatzar
614ca90ca2 [MM-18058] Use GetAnyUnreadPostCountForChannel for NotifyProps.push == all (#11979)
* Use GetAnyUnreadPostCountForChannel for NotifyProps.push == all

* Extract out msg building and add unit test
2019-08-30 15:00:28 +02:00
Claudio Costa
e1eb839636 Add integrity check command to CLI (#11599)
* Add integrity command

* Add structures and implementation for basic referential integrity check

* Use a channel to receive integrity check reports as they generates

* Setup unit testing

* Add confirm prompt to integrity command and make verbose output optional

* Add more integrity checks

* Use wrapper functions to simplify behaviour and tests

* Improve extensibility of IntegrityCheckResult

* Improve CheckIntegrity tests performance

* Use a config structure for relational integrity checks

* Add more relational integrity checks

* Add more checks and do some cleanup

* Add more relational integrity checks with proper tests

* Fix tests to use sync functions

* Add more info to integrity command help

* Add more relational integrity checks

* Add more relational integrity checks

* Add missing checks

* Show more information about missing records

* Fix to use new sync function

* Change integrity check functions to accept a SqlSupplier

* Fix code duplication

* Use squirrel for query building
2019-08-30 09:44:55 -03:00
Elias Nahum
d1f0216c22 Remove @ sign from app.notification.subject.direct.full translation (#11990)
* Remove @ sign from app.notification.subject.direct.full translation

* Fix uni test
2019-08-30 11:14:01 +09:00
Miguel Alatzar
0cd3663d91 [MM-17300] Do not add empty string as a keyword key (#11961)
* Do not add empty string as a keyword key

* Add unit test

* User assert lib over t.Fatal
2019-08-29 17:49:31 -04:00
threepwood-mm
782375f5c7 [MM-17703] Diff config files (#11898) 2019-08-29 22:44:12 +02:00
Jesús Espino
6aa7442e43 Changing default smtp port to use the new inbucket port as default (#11965) 2019-08-29 22:11:45 +02:00
Carlos Tadeu Panato Junior
9e9f1bb2aa Stop plugin healthchecks before shutting down plugins (#11972)
* cancel plugin check when shutdown

* move to top

* stop healthcheck job only once, and if started

* whitespace
2019-08-30 02:36:38 +08:00
Micah Thompson
2980d341d4 MM-11102 Show channel links in notification emails (#11670)
* Added code to hyperlink channels in HTML email

Adjusted imports

* Rending channel display name in hyperlink instead of channel URL handler

Addressed go formatting warning

* [MM-11102] Channel links should show as links in notification emails

* Escaped post;ChannelMentions, GetChannelsByName functions; Changed tests

* remove mlog.info

* MultiMention and Escape tests; Change logging
2019-08-29 18:09:09 +08:00
Jason Blais
b91824328a Reorder re-packaged plugins to be alphabetical in diagnostics (#11974) 2019-08-27 13:26:45 -07:00
Daniel Schalla
a92c830e57 Add additional input validation for user creation (#11937) 2019-08-27 10:39:01 +02:00
Miguel de la Cruz
b8fa36cb41 [MM-17200] Adds specific messages when guest is added or joins a channel (#11803)
* [MM-17200] Add user joined as guest message

* [MM-17200] Add user added to channel as guest messages
2019-08-26 12:02:45 +02:00
Elias Nahum
24e0d6f00d Add @ prefix for sender username in push notifications (#11934)
* Add @ prefix for sender username in push notifications

* de-duplicating code
2019-08-23 09:46:43 -04:00
Jesper Hansen
f753819a66 [MM-17554] Health Check: improves enhanced health check with a DB write check. (#11851)
* Add db write check to enhanced ping check function (#11813)

* fix misspelling

* improve logging (#11813)

* MM-17554: update logging to uppercase

* MM17554: log DB read/write success (#11813)
2019-08-22 18:25:50 -04:00
Miguel de la Cruz
a9ed8fab28 Return POST_EMBED_LINK for links that are not images nor og (#11723) 2019-08-22 23:00:37 +02:00
Ali Farooq
5754ffc320 MM-17087 - Disable plugin on removal (#11779)
* MM-17087 - Disable plugin on removal

* Updated documentation

* Got reid of notifyPluginEvents

* Updated documentation

* Added plugin installation/activatoin flow as a toplevel go doc in plugin_install.go

* Generating webapp bundle on plugin installation

* Fixed shadowing issue

* Updated doc to include unguarded race condition

* Renamed GenerateWebappBundle

* Added a debug log when peers are not ready to notify

* Updated docs

* Removed extra line
2019-08-22 15:17:47 -04:00
Maria A Nunez
53f4bf1ec1 MM-17688 - Updated http timeout for plugin install from URL (#11887)
* Bumped http request timeout for plugin install from URL

* Added unit test for timeout higher than 30 seconds. Other minor PR feedback

* Fixed spacing
2019-08-22 13:33:28 -04:00
Gervasio Marchand
11b0a20d7d MM-16821 - Add a KVCompareAndDelete to the plugin API (#11804)
* Implement KVCompareAndDelete and KVCompareAndDeleteJSON

* Add tests for KVCompareAndDelete

* Update minimum server version

* Handle nil value on CompareAndSet so that it deletes it

* Fix comments

* Tweaks from PR comments

* Go back to deleted, err
2019-08-21 23:25:38 -03:00
Jesús Espino
f8ad9f3b8f Initial cache migration to new layers system (#11878)
* Initial cache migration to new layers system

* Fixing wrong change

* Remove unneeded constants

* Remove unneeded file

* Adding license headers
2019-08-21 20:23:06 +02:00
Carlos Tadeu Panato Junior
bd152c6534 bump dockerfile with latest mattermost package (#11901) 2019-08-21 12:44:10 +02:00
Carlos Tadeu Panato Junior
12ff098c5f update minio docker image (#11905) 2019-08-21 12:09:49 +02:00
Carlos Tadeu Panato Junior
9fb5666bc0 remove not used file (#11906) 2019-08-21 12:09:32 +02:00
atpons
8cdbc734b9 Add SetToken function to NewAPIv4Client (#11722) 2019-08-20 09:58:59 +02:00
Harrison Healey
bd270aecbd MM-17071 Remove auto responder logic from App.SendNotifications (#11789)
* MM-17071 Remove auto responder logic from App.SendNotifications

* Log errors returned by SendAutoResponseIfNecessary
2019-08-19 14:15:09 -04:00
Harrison Healey
e7c58dcba3 MM-17492 Update error message for CustomURLSchemes setting (#11895) 2019-08-19 10:15:50 -04:00
Lev
00021a98b0 Bump bundled Autolink plugin to v1.1.0 (#11872) 2019-08-16 12:53:07 -07:00
jfrerich
baedcc856f [MM-17741] when converting bot to a user set the correct email. (#11879)
* Send notifications when bot converted to user

* Revert notification sending from CLI.
If user is a bot, set email to CLI email, not the previous email because
previous email <botname>@localhost

* Add comment describing the additional if statement

* Rewording

* remove duplicate word

* Update Comment

* Add tests for bots.  In both cases of RequireEmailVerification settings,
the Email should be set to the value passed to the UpdateUser function
and the previous faked localhost email ignored
2019-08-16 07:37:22 -07:00