Commit Graph

12524 Commits

Author SHA1 Message Date
Hossein Ahmadian-Yazdi
2c9c58ff50 [MM-25268] Implement prefix/suffix searching on teams and channel page in system console (#14698)
* Implement prefix/suffix search on teams page

* Make Channel Page prefix/suffix search as well

* address PR comments

* add tests

* fix styling

* take postgres into account

* add more api tests

* update test

* add team store test

* write store test for team and channel

* fix lint

* update description

* revert go mod

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-06-15 11:21:42 -04:00
Jesús Espino
92c98dac3e Remove RunOldAppInitialization (#14803) 2020-06-15 09:44:17 +02:00
Miguel de la Cruz
4bc859433b [MM-24604] Migrate get channel and get channel by name endpoints to local mode (#14547)
* add unix socket listener for mmctl local mode

* First working PoC

* Adds the channel list endpoint

* Add team list endpoint

* Add a LocalClient to the api test helper and start local mode

* Add helper to test with both SystemAdmin and Local clients

* Add some docs

* Adds TestForAllClients test helper

* Incorporating @ashishbhate's proposal for adding test names to the helpers

* [MM-24146] Add unix socket listener for mmctl local mode (#14296)

* add unix socket listener for mmctl local mode

* add a constant for local-mode socket path

* reflect review comments

* Fix init errors after merge

* Adds create channel tests

* Always init local mode to allow for enabling-disabling it via config

* Check the RemoteAddr of the request before marking session as local

* [MM-24604] Migrate get channel and get channel by name endpoints to local mode

* Remove local test conditional

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
2020-06-14 10:31:20 +02:00
Ben Schumacher
81a87533a9 [MM-25607] Correctly log if plugin icon is invalid (#14679) 2020-06-13 09:51:45 +02:00
Jesús Espino
ac4c675a19 Fixing plugin routes (#14805)
Automatic Merge
2020-06-12 22:26:35 +02:00
Nisheet Sinvhal
f1c52387ae MM-25779 - Update apiTimerLayerTemplate and hooksTimerLayerTemplate to record error values (#14764)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-06-12 12:12:37 -04:00
Mario de Frutos Dieguez
033db51907 Remove UserStore.Get gorp usage (#14672)
We're removing the user of gorp in the most used queries
by our platform and this is one of them
2020-06-12 17:09:18 +02:00
Flavia Bastos
f912a93299 Document SqlTeamStore delete methods (#14785)
* Document SqlTeamStore delete methods

* Address feedback from code review: clarify permantDelete method
2020-06-12 13:46:35 +02:00
Jesús Espino
f5eab1271b Removing all FakeApp usages (#14174)
* Removing some other fake apps

* More FakeApp removed

* Removing entirely FakeApp

* Fixing some tests

* Fixing get Cluster id from get plugin status

* Fixing failing tests

* Fixing tests

* Fixing test initialization for web

* Fixing InitServer for server tests

* Fixing InitServer for server tests

* Reverting go.sum and go.mod

* Removing unneded HTMLTemplates function in App layer

* Moving back some functions to its old place to easy the review

* Moving back some functions to its old place to easy the review

* Using the last struct2interface version

* Generating store layers

* Fixing merge problems

* Addressing PR comments

* Small fix

* Fixing app tests build

* Fixing tests

* fixing tests

* Fix tests

* Fixing tests

* Fixing tests

* Fixing tests

* Moving license to server struct

* Adding some fixes to the test compilation

* Fixing cluster and some jobs initialization

* Fixing some license tests compilation problems

* Fixing recursive cache invalidation

* Regenerating app layers

* Fix test compilation

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-06-12 13:43:50 +02:00
Ashish Bhate
f3ac33e6dc MM-25078: local mode for createUserAccessToken, revokeUserAccessToken and getUserAccessTokensForUser (#14680)
Summary
- local mode for createUserAccessToken
- local mode for revokeUserAccessToken
- local mode for getUserAccessTokensForUser, also removed a duplicate test.

Ticket Link
- https://mattermost.atlassian.net/browse/MM-25078
- https://mattermost.atlassian.net/browse/MM-25079
- https://mattermost.atlassian.net/browse/MM-25080
2020-06-12 16:29:05 +05:30
waqas razzaq
7787998bee MM-23408: Added channel ID check for Plugin API UploadFile (#14138)
* Added 2 checks for app/file.go
- Check if channel id exist
- Check if user has permission to the upload file to the channel

Also added translations for 2 errors defined in app/file.go

* fixed 1 failing test that was linked with UploadFile

* Fixed small issue, according to the review.

* missed 1 review item. Just updated the code for it.

* fix 1 failing test, assuming that the file upload is required. ignoring nouser idea.

Added the translation for english for 2 newly defined errors.

* removed new line

* trying to fix the translation issue. Added the missing translations from master.

* as per discussion, we need to revert the check for user channel permission. So reverted it.

* Update app/file_test.go

Co-Authored-By: Alejandro García Montoro <alejandro.garciamontoro@gmail.com>

* Update i18n/en.json

Co-Authored-By: Alejandro García Montoro <alejandro.garciamontoro@gmail.com>

* Update file.go

Move the check to the top of the method.

* go fmt

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Alejandro García Montoro <alejandro.garciamontoro@gmail.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2020-06-12 12:21:18 +02:00
Ashish Bhate
8de5dd9022 MM-25075: local mode for getLogs (#14760) 2020-06-12 15:02:57 +05:30
Ashish Bhate
c58c0ba3dc MM-24440: Don't allow clearing the site url (#14694)
Summary
- If the site URL is set, don't allow clearing it.

Ticket Link
- https://mattermost.atlassian.net/browse/MM-24440
2020-06-12 14:00:11 +05:30
Ashish Bhate
d5e9fde8d7 MM-24865: local mode for some user handlers (#14511)
Summary
- Local mode handler for createUser
- Local mode handler for updateUser
- Local mode support for updateUserRoles
- Local mode support for sendPasswordReset
- Local mode support for updateUserMfa
- Local mode support for updateUserActive

Ticket Link
- https://mattermost.atlassian.net/browse/MM-24865
- https://mattermost.atlassian.net/browse/MM-24869
- https://mattermost.atlassian.net/browse/MM-24866
- https://mattermost.atlassian.net/browse/MM-24868
- https://mattermost.atlassian.net/browse/MM-24870
- https://mattermost.atlassian.net/browse/MM-25041
2020-06-12 12:05:09 +05:30
Agniva De Sarker
f30a62e303 MM-24876: local mode support for getPost (#14735)
Automatic Merge
2020-06-12 06:26:35 +02:00
Rodrigo Villablanca
172eb1853f Migrate PermanentDeleteByTeam method from ChannelStore to return erro… (#14707)
Automatic Merge
2020-06-11 17:26:35 +02:00
Shota Gvinepadze
77b468e456 [MM-25606] Make plugin API errors encodable (#14692)
* Make plugin API errors encodable

* Remove newlines

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-06-11 16:44:50 +04:00
Eli Yukelzon
11812ae8e4 MM-25450 deleted posts should be sanitised (#14769) 2020-06-11 13:12:13 +03:00
Miguel de la Cruz
28e58f7088 [MM-25950] Fix bleve error string (#14791)
Automatic Merge
2020-06-11 10:56:35 +02:00
Rodrigo Villablanca
41d9c673cf Migrate GetChannels method from ChannelStore to return error interface (#14711)
* Migrate GetChannels method from ChannelStore to return error interface

* Fix testing

* Changed error type: ErrInvalidInput -> ErrNotFound

* Added note about error migrations

* Fix en.json

* Fix i18n

Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
2020-06-11 14:02:03 +05:30
Rodrigo Villablanca
9b0ae49b55 Migrate GetDeleted method from ChannelStore to return error interface (#14710)
* Migrate GetDeleted method from ChannelStore to return error interface

* Moving i18n translations to the correct place

Co-authored-by: Jesús Espino <jespinog@gmail.com>
2020-06-11 09:37:37 +05:30
Ashish Bhate
f2253df8a1 MM-25083: local mode for patchBot, getBots, enableBot, disableBot and assignBot (#14652)
* local mode for patchBot
* local mode for getBots
* local mode for enableBot and disableBot
* local mode for assignBot
2020-06-10 15:25:14 +05:30
Jason Frerich
deeba8f609 add plugin telemetry (#14772)
* add plugin telemetry

* correct confluence id
2020-06-09 15:36:18 -05:00
Jason Frerich
a69c200574 update bundled plugins for server version 5.24 (#14727)
* update bundled plugins for server version 5.24

* github should be 1.0.0

* upgrade to welcomebot 1.2.0

* autolink 1.2.0 currently has breaking changes. revert to previous
version

* revert to jira 2.3.  users can still upgrade via marketplace

* correct the jira version

* revert to original versions.  Play conservative
2020-06-09 11:20:26 -07:00
Jesús Espino
9c9bdb8a90 Fix the reply count for pinned posts (#14744) 2020-06-09 18:42:59 +02:00
Rodrigo Villablanca
cac154e62b Migrate GetAllChannels and GetAllChannelsCount from ChannelStore to r… (#14765)
* Migrate GetAllChannels and GetAllChannelsCount from ChannelStore to return plain errors

* Moving i18n translations to the correct place

Co-authored-by: Jesús Espino <jespinog@gmail.com>
2020-06-09 21:48:01 +05:30
Ibrahim Serdar Acikgoz
779099d1a9 [MM-25715] services/mailservice: fix a flaky test (#14745)
* services/mailservice: fix a flaky test

* mailservice: reflect review comments

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-06-09 13:47:04 +03:00
Elisabeth Kulzer
be44de22cf Docker compose network (#14783)
Automatic Merge
2020-06-09 11:17:18 +02:00
George Goldberg
921cff0e60 MM-24483: Add telemetry for new config settings. (#14773) 2020-06-09 09:04:52 +01:00
Elisabeth Kulzer
7d1aad9822 Revert "Docker compose network (#14771)" (#14782)
This reverts commit 91f1c47ba3.
master is broken because of this. Skip tests.
2020-06-09 09:56:47 +02:00
Elisabeth Kulzer
91f1c47ba3 Docker compose network (#14771)
* Updating to use a different network cidr for the mm-test network

* Update docker-compose.yaml

Remove gateway as its not needed and caused problems before

Co-authored-by: Jason Deland <jaydeland@gmail.com>
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Jason Paul Deland <9366595+jaydeland@users.noreply.github.com>
2020-06-09 09:00:09 +02:00
Miguel de la Cruz
457903a12c [MM-25713] Adds props check to post import validator (#14728)
* [MM-25713] Adds props check to post import validator

* Fix linter

* Address review comments

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-06-08 21:20:40 +02:00
Miguel de la Cruz
6cd898fab7 [MM-25714] Keeps track of the import lines of the posts while importing to report the right line on error (#14752)
* [MM-25714] Keeps track of the import lines of the posts while importing to report the right line on error

* Adding review comments

* Reverse the order of the error and error line params
2020-06-08 12:12:07 +02:00
Flavia Bastos
ea06c291df Document sqlTeamStore search methods (#14702)
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-06-06 11:53:28 +02:00
Rodrigo Villablanca
6f28f3526d Migrate PermanentDelete method from ChannelStore to return error inte… (#14706)
Automatic Merge
2020-06-06 11:47:18 +02:00
Abdulkadir Poyraz
88e8f56f03 refactor cluster discovery store to use squirrel (#14560)
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-06-05 17:58:29 +02:00
Carlos Tadeu Panato Junior
c2f171af07 dockerfile: bump base MM package to 5.23.1 (#14757)
Automatic Merge
2020-06-05 05:02:16 -07:00
Rodrigo Villablanca
ac32b2da41 Migrate Delete/Restore/SetDeleteAt methods from ChannelStore to return error interface (#14700)
Automatic Merge
2020-06-05 04:32:16 -07:00
Martin Kraft
18ddae2c1b MM-25737: Fix for groups list not returning results. (#14746)
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-06-04 11:31:07 -04:00
Carlos Tadeu Panato Junior
ca8a67c7cb database: upgrade db to 5.24 (#14749) 2020-06-04 16:14:22 +02:00
Ashish Bhate
4df8927c60 MM-24867: local mode for inviteUsersToTeam (#14558)
local mode support for inviteUsersToTeam

https://mattermost.atlassian.net/browse/MM-24867
2020-06-04 16:41:52 +05:30
Ibrahim Serdar Acikgoz
8890f41491 api4/post_test: fix a flaky test (#14741) 2020-06-04 12:52:40 +03:00
Agniva De Sarker
21b753b38d [MM-25314] Migrate AppError from channel_member_history_store.go (#14693)
* Migrate AppError from channel_member_history_store

* Migrate AppError from channel_member_history_store

* Migrate AppError from channel_member_history_store

* Migrate AppError from channel_member_history_store

* Migrating error keys

* Review fixes.

* Regenerating i18n

* Add some i18n strings

Co-authored-by: Dante Pippi <6619666+dantepippi@users.noreply.github.com>
Co-authored-by: Jesús Espino <jespinog@gmail.com>
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-06-04 13:08:51 +05:30
Rodrigo Villablanca
3649d04dfa SqlLinkMetadataStore migrates to plain errors (#14674)
Automatic Merge
2020-06-03 13:32:16 -07:00
Miguel de la Cruz
2ba119d7f6 [MM-25712] Fix silent errors on post import failures (#14729)
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-06-03 16:40:24 +02:00
Christopher Poile
7bba8db65f MM-25595 - Edits to bot username and display name fail to save (#14699)
* invalidate the user profile cache bc we know it's now outdated

* invalidate cache when updating user roles; test

* tests fix -- experimental

* fixing linter errors

* revert to original solution

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-06-03 09:27:00 -04:00
Ibrahim Serdar Acikgoz
19e5afd607 [MM-24863] Migrate update/patch/search/delete team endpoints for local mode (#14581)
* [MM-24146] Add unix socket listener for mmctl local mode (#14296)

* add unix socket listener for mmctl local mode

* add a constant for local-mode socket path

* reflect review comments

* [MM-24401] Base approach for Local Mode (#14333)

* add unix socket listener for mmctl local mode

* First working PoC

* Adds the channel list endpoint

* Add team list endpoint

* Add a LocalClient to the api test helper and start local mode

* Add helper to test with both SystemAdmin and Local clients

* Add some docs

* Adds TestForAllClients test helper

* Incorporating @ashishbhate's proposal for adding test names to the helpers

* Fix init errors after merge

* Adds create channel tests

* Always init local mode to allow for enabling-disabling it via config

* Check the RemoteAddr of the request before marking session as local

* Mark the request as errored if it's local and the origin is remote

* Set the socket permissions to read/write when initialising

* Fix linter

* Replace RemoteAddr check to ditch connections with the IP:PORT shape

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>

* Fix translations order

* [MM-24832] Migrate plugin endpoints to local mode (#14543)

* [MM-24832] Migrate plugin endpoints to local mode

* Fix client reference in helper

* api4/team: add local endpoints

* [MM-24776] Migrate config endpoints to local mode (#14544)

* [MM-24776] Migrate get config endpoint to local mode

* [MM-24777] Migrate update config endpoint to local mode

* Fix update config to bypass RestrictSystemAdmin flag

* Add patchConfig endpoint

* MM-24774/MM-24755: local mode for addLicense and removeLicense (#14491)

Automatic Merge

* api4/team: reflect review comments

* api4/team: add to permissions

* fix post conflict issues

* fix formatting

Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
Co-authored-by: Ashish Bhate <bhate.ashish@gmail.com>
2020-06-03 14:14:21 +03:00
Ibrahim Serdar Acikgoz
0965e8485a [MM-24594] api4/channel: add/remove member & get public/deleted chs for local-mode (#14590)
* [MM-24146] Add unix socket listener for mmctl local mode (#14296)

* add unix socket listener for mmctl local mode

* add a constant for local-mode socket path

* reflect review comments

* [MM-24401] Base approach for Local Mode (#14333)

* add unix socket listener for mmctl local mode

* First working PoC

* Adds the channel list endpoint

* Add team list endpoint

* Add a LocalClient to the api test helper and start local mode

* Add helper to test with both SystemAdmin and Local clients

* Add some docs

* Adds TestForAllClients test helper

* Incorporating @ashishbhate's proposal for adding test names to the helpers

* Fix init errors after merge

* Adds create channel tests

* Always init local mode to allow for enabling-disabling it via config

* Check the RemoteAddr of the request before marking session as local

* Mark the request as errored if it's local and the origin is remote

* Set the socket permissions to read/write when initialising

* Fix linter

* Replace RemoteAddr check to ditch connections with the IP:PORT shape

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>

* Fix translations order

* [MM-24832] Migrate plugin endpoints to local mode (#14543)

* [MM-24832] Migrate plugin endpoints to local mode

* Fix client reference in helper

* [MM-24776] Migrate config endpoints to local mode (#14544)

* [MM-24776] Migrate get config endpoint to local mode

* [MM-24777] Migrate update config endpoint to local mode

* Fix update config to bypass RestrictSystemAdmin flag

* Add patchConfig endpoint

* MM-24774/MM-24755: local mode for addLicense and removeLicense (#14491)

Automatic Merge

* api4/channel: add/remove member & get public/deleted chs for local-mode

* api4/channel_local: reflect review comments

Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
Co-authored-by: Ashish Bhate <bhate.ashish@gmail.com>
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-06-03 12:20:52 +03:00
Sudheer
1b95b82b18 MM-25723 Add an experimental setting for data prefetching (#14731)
* MM-25723 Add an experimental setting for data prefetching

* Fix formatting

* Fix bool error

* Fix lint error

* Change default to true
2020-06-03 14:43:59 +05:30
Agniva De Sarker
e3255879ba Enable gossip encryption (#14640)
* Enable gossip encryption

* Fix order

* Auto-generate key

* Update gorp fork to include BeginTx

* Add a test for InsertIfExists

And point gorp to a custom branch for now

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-06-03 14:16:15 +05:30