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

1683 Коммитов

Автор SHA1 Сообщение Дата
Nikhil Ranjan
e8911b3e08 Converting to structured logging the file app/analytics.go (#12171) 2019-09-12 17:58:16 +02:00
Nikhil Ranjan
b7a879b985 Converting to structured logging the file app/post.go (#12138) 2019-09-12 10:27:04 -05:00
Elias Nahum
794ae335b3 MM-17953 Set updateAt and remove from cache when a user is (de)activated (#12178) 2019-09-12 16:30:15 +02:00
Nikhil Ranjan
37d719d20c Converting to structured logging the file app/ratelimit.go (#12176) 2019-09-12 13:35:07 +02:00
Nikhil Ranjan
d327df12e6 MM-18264 Converting to structured logging the file app/emoji.go (#12139) 2019-09-11 22:49:27 -05:00
Elias Nahum
3618947094 MM-18066 Remove double @ for email notifications (#12131)
* Remove double @ for email notifications

* Fix tests
2019-09-11 17:30:35 -03:00
Paulo Bittencourt
9c3fc4ab9f [MM-15220] Add generic error field to SubmitDialogResponse (#12081)
This will allow integrations to return an generic error message that is
not tied to a specific dialog field.
2019-09-11 11:35:51 -04:00
Nikhil Ranjan
a5f04802e8 MM-18266 Converting to structured logging the file app/web_con… (#12141) 2019-09-11 11:16:33 -04:00
Nikhil Ranjan
df85bd422f Converting to structured logging the file app/notification.go (#12140) 2019-09-11 07:52:12 -07:00
Hector
bf847ba184 MM-18290 Using structured logging in file "security_update_che… (#12123)
* Refactor to use structured logging

* Properly formatted with gofmt
2019-09-11 07:33:07 -04:00
jfrerich
1802c575e5 [MM-18119] Add methods for getting teams and count when query… (#12020)
* Add methods to handle include_total_count api parameter when permissions
for authenticated user is not sysadmin

* Add translations for app errors

* Add Mocks

* Add tests for new methods

* When running at the TeamStore testing level, the number of returned
teams is different than running tests individually.  Fix for now and
submit help wanted do proper teardown after each test

* correct value when running test at the top level

* Add helper function to delete previous teams in db

* Instead of checking against numbers of teams returned, check against the
actual teams returned.
When creating test teams, use unique DisplaName values so the return
array will be sorted consistantly.
When testing private and public team counts, add teams that should not
be counted.  Also create odd number of public/private teams for better
error protections.  Don't want 1 of each type
2019-09-10 11:50:27 -05:00
Lev
9e6c5e8ea6 MM-17489: fixed racy tryExecutePluginCommand (#11780)
* MM-17489: fixed racy tryExecutePluginCommand

* PR feedback

* MM 7971 dockerhost -> localhost && docker -> docker-compose (#10872)

* replace dockerhost with localhost

* remove uneeded setup-max build step (no more dockerhost)

* changes as recommended by @cpanato

* make clean-docker with docker-compose

* added ports to docker-compose.yml (needed for osx).   ignore error for ldapadd (when already exists)

* add clean-old-docker to legacy.mk

* docker-compose stop instead of down for `make stop-docker`

* MM-17117: Updates einterface for FirstLoginSync. (#11737)

* update sampledata users passwords (#11769)

* update sampledata users passwords

* update makefile

* Tweak docker compose setup (#11785)

* fix stray dockerhost mention

* fix stray whitespace

* fix missing mattermost-redix cleanup in clean-old-docker

* absolute path to docker-compose, plus simpler ldap initialization

* allow ldapadd to fail on CI

* MM-16366 - Prevent attachment duplication on import (#11770)

* prevent attachment duplication

* improved tests

* corrected import into a new post

* WIP: a failed attempt to add tests

* remove debugging statements

* fix godoc

* enable plugins when testing

* rework reentrant unit tests
2019-09-10 12:28:12 -04:00
Nikhil Ranjan
94eb3caa73 Converting to structured logging the file app/command_echo.go (#12144) 2019-09-10 14:08:29 +02:00
Nikhil Ranjan
2e76c4c0c7 MM-18261 Converting to structured logging the file app/team.go (#12136) 2019-09-10 06:25:16 -04:00
Jesús Espino
3c8665f510 Remove premature optimization that was generating a bad users isolation (#12128)
* Remove premature optimization that was generating a bad users isolation

* fixing tests
2019-09-10 11:45:08 +02:00
sowmiyamuthuraman
45601bb6dc Fix. Replace t.fatal() calls to testify assert/require calls (#12084) 2019-09-09 20:10:17 +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
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
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
Woolim Cho
b9a3c2e90e MM-10272: Add a count for pinned posts header icon (#11840) 2019-09-04 13:41:29 +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
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
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
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
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
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
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
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
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
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
Jesús Espino
83197ec5ff Fixing websockets updates for promote/demote (#11799)
* Fixing websockets updates for promote/demote

* Adding extra test check

* Addressing PR comments
2019-08-16 08:39:34 +02:00
Ali Farooq
e71b99d9f6 Update diagnostics to fix gofmt issue (#11891) 2019-08-15 10:42:03 -07:00
Aaron Rothschild
abafcb4bd7 MM-17483 Add Pre-packaged plugins to telemetry (#11876)
* MM-17483 Add Pre-packaged plugins to telemetry

Telemetry is triggered whenever Jenkins, Skype for Business, Antivirus or Gitlab is activated

https://mattermost.atlassian.net/browse/MM-17483

* Remove Skype4Business from telemetry 

It isn't being pre-packaged this quarter.
2019-08-15 09:07:35 -07:00
Hossein Ahmadian-Yazdi
c1392e12ab [MM-17604] Fix message not being broadcasted when a user automatically joins channel (#11849) 2019-08-14 13:09:44 -07:00
Harrison Healey
23ef7d9a62 MM-17609 Add EnableSVGs setting (#11874)
* MM-17609 Add EnableSVGs setting

* MM-17609 Return SVG images in post metadata
2019-08-14 13:40:40 -04:00
Miguel de la Cruz
b36eb415d1 [MM-17213] Fix domain check when inviting guests and update user checks (#11793)
* Add update user check for guests and tests

* [MM-17213] Fix domain check when inviting guests

* Fix i18n strings

* Fix tests

* Add missing translation

* Adds test case for non guest user
2019-08-14 16:07:58 +02:00
Eli Yukelzon
da768d677e MM-16888 - Fix canonical vs. migration mismatches (#11825)
* fixed migration errors, added check to Jenkins
2019-08-14 14:58:01 +03:00
Jesse Hallam
9ce52fb1da MM-16378: revert plugin health check config removal (#11819)
* revert 4e5f6fcfbc

This reverts the configuration setting to disable plugin health checks, preferring instead to retain this functionality for advanced cases. In part, this was driven by the discovery that the health checks were failing on Windows, though that will be addressed separately.

Fixes: MM-16378

* simplify interval handling/logging

Also shutdown the job when plugins are altogether disabled.
2019-08-12 18:48:02 -03:00