Commit Graph

12110 Commits

Author SHA1 Message Date
George Goldberg
d7206d2ede Update dependencies. (#13778) 2020-02-03 08:19:38 -08:00
Ben Schumacher
1a82e3e575 Add documentation for number field for plugins (#13800)
* Add example for release_notes_url

* Add number field
2020-01-31 21:36:14 +01:00
Jesse Hallam
918307e4fa delete kv on setting nil (#13769)
Setting a `nil` value should actually delete the row instead of preserve it with a `nil` value.

The existing tests passed because they only checked the return value of `nil`. When running the tests on Postgres, this value is returned as an empty `[]byte{}` instead of `nil`, so update the test to reflect this semantically equivalent behaviour.
2020-01-31 09:58:48 -04:00
Shobhit Gupta
2732a0c966 Ignore empty fields, change method name (#13773) 2020-01-31 14:17:26 +01:00
Jesús Espino
d66a2f90c6 Removing unused param and unneeded query (#13792) 2020-01-30 16:12:37 +01:00
Mario de Frutos Dieguez
9de8283077 MM-22067: Check guest email allowance separately (#13776) 2020-01-30 09:25:52 +01:00
Ibrahim Serdar Acikgoz
99a82ef07e plugin/helpers: fix an unchecked issue when comparing two conf… (#13748) 2020-01-29 20:41:25 +01:00
Doug Lauder
40b7790318 MM-21727 add an endpoint to move a command to another team (#13624)
* MM-21727 add an endpoint to move a command to another team

* endpoint
* mock / client
* unit tests

* MM-21727 PR feedback, addressed nits

* MM-21727 remove CommandMove base route

* MM-21272 replace TeamId struct with CommandMoveRequest struct

* MM-21727 fixed typo in CommandMoveRequest struct name

* MM-21727 return not-found for all getCommandById calls

* MM-21727 ensure no command ids leak

* when calling GetCommandById with invalid id return not_found
* when checking perms to manage commands for team return same not_found
* update unit tests to check for not_found

* MM-21727 Rename TeamIdFromCommandMoveRequestJson -> CommandMoveRequestFromJson
2020-01-29 11:56:21 -05:00
Farhan Munshi
fa769e46d7 [MM-21793] Allow bots to be added to group synced channels and teams (#13672)
* MM-21793: Allow bots to be removed and added from group synced teams and channels

* MM-21793: Add tests for adding and removing a team and channel members

* MM-21793 Add punctuation to comments and remove unnecessary variable
2020-01-29 11:01:06 -05:00
Shota Gvinepadze
ffb3897c8c Disable signatures modification through API (#13682)
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-29 18:39:00 +04:00
Eli Yukelzon
4b39d8487b MM-20977 - Inviting multiple users with valid/allowed and inva… (#13779) 2020-01-29 12:56:59 +02:00
Mario de Frutos Dieguez
682a1d5d15 Avoid panic when push messages are empty or nil (#13751) 2020-01-29 10:08:27 +01:00
Elisabeth Kulzer
3049378506 Add 5.20 method to release branches for adding GOBIN. (#13785) 2020-01-28 19:59:47 +01:00
Ben Schumacher
cb49d560ab Allow plugins to specify a ReleaseNotesURL via manifest (#13677) 2020-01-28 19:33:21 +01:00
Jesús Espino
5f888bd4fc Making private app/cluster_handlers.go methods (#13760) 2020-01-28 12:06:21 +01:00
Jesús Espino
ae6f15b76f Making private import methos in the app layer (#13758)
* Making private import methos in the app layer

* Making one more method private
2020-01-28 10:58:33 +01:00
Jesús Espino
a76643116f Making private opengraph methods in the app layer (#13759) 2020-01-28 10:56:45 +01:00
Agniva De Sarker
11d15107b0 MM-21922: Add metrics for http verb (#13679)
* MM-21922: Add metrics for http verb

* Use multiple params

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-28 08:52:00 +05:30
Jesse Hallam
815e6b5956 .gitignore prepackaged_plugins and report.xml (#13765) 2020-01-27 12:46:26 -04:00
Farhan Munshi
afa35ac575 [MM-21946] [MM-21945] Ensure deleted groups are not returned from the groups API (#13747)
* MM-21946 Ensure deleted groups are not returned from the groups API

* MM-21946 Only append to query at the end

* MM-21946 Add DeleteAt check to the top of the GetGroups function and clean up the formatting a bit

* MM-21946 Move the From statement into the next block
2020-01-27 11:45:14 -05:00
Jesse Hallam
9726a917cb MM-21915: improve tar gz path traversal (#13675)
Automatic Merge
2020-01-27 11:33:11 -05:00
Jesús Espino
c3ad342c5e Fix GetMembers store methods order, which wasn't working properly in postgres (#13754) 2020-01-27 15:49:51 +01:00
Shota Gvinepadze
1e9556cc28 [MM-21572] Disable InstallFromUrl if EnableUploads is false (#13636)
* Disable InstallFromUrl if EnableUploads is false

* Break into 3 seperate lines

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-27 17:12:16 +04:00
Agniva De Sarker
f0934361a1 export GOBIN (#13752)
* export GOBIN

* Add comment
2020-01-27 13:34:35 +05:30
Ali Farooq
30061b2285 MM-20865 - Demo Plugin: Enabling and disabling demo plugin generates "connection is shutdown" error (#13604)
Automatic Merge
2020-01-24 09:49:49 -05:00
Doug Lauder
28ec291910 MM-19250 - new endpoint to retrieve command by id (#13598)
* MM-19250 add endpoint to retrieve command by id

* endpoint
* client
* unit tests

* MM-19250 update comment; remove redundant unit test

* MM-19250 rename GetCommand to GetCommandById

* MM-19250 don't filter on autocomplete flag

* MM-19250: require team_id when using GetCommandById

* team_id added to endpoint query string for GET
* unit test to check for mismatch teamid param and command teamid

* Revert "MM-19250: require team_id when using GetCommandById"

This reverts commit ed78e27964.

* MM-19250 don't leak existence of id when user doesn't have perms

* return 404 not_found when id not found
* return 404 not_found when id exists but user missing perms to view team
* return 404 not_found when id exists but user missing perms to manage commands

* MM-19250 fix typos in comments

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-24 09:32:56 -05:00
Jesús Espino
5133fa18f1 Compare config without environment variables to send config updates (#13746) 2020-01-24 08:57:46 +01:00
Agniva De Sarker
21034c3513 MM-21019 - Fix race in (*Environment).SetPluginState() (#13610)
* MM-21019 - Fix race in (*Environment).SetPluginState()

- We change from passing pointers to registeredPlugin to passing
the struct by value.
- We also add a mutex to the supervisor struct to protect
from racy data access.

* move the immutability comment to the godoc of the Active method

* Changing mut to lock

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-24 09:00:35 +05:30
Marco Kundt
3892db4613 Fix small typo (#13739) 2020-01-23 18:06:57 -05:00
Mario de Frutos Dieguez
0581ff7cb8 User Management > User role change not reflected in the UI without a refresh (#13683) 2020-01-23 19:30:13 +01:00
Allen Lai
90c0479c2f [MM-20804] Add "Unarchive Channel" option to the channel info screen - Additional fixes (#13614)
Automatic Merge
2020-01-23 12:49:48 -05:00
Miguel de la Cruz
eb17f8436f Modifies the interface to add search index metrics and initialises metrics first so it can be used from elasticsearch (#13663) 2020-01-23 17:10:36 +01:00
Shota Gvinepadze
71ceb7f18f [MM-18121] Fix config set panic (#13350)
* Fix config set panic

* Add test

* Fix golint issues

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-23 11:20:36 -04:00
Elisabeth Kulzer
5eabfaac67 Add mm server bin directory (#13738)
* Add server bin directory needed for build process.
2020-01-23 12:34:29 +01:00
Ben Schumacher
58fb80e377 Remove imports from golint blacklist (#13662)
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-22 19:42:02 +01:00
Ali Farooq
afd54413f7 MM-21769 - Validate plugin bundle and signature files when pac… (#13629)
* MM-21769 - Validate plugin bundle and signature files when packaging MM

* Renamed public key, using gpg exit code to verify success

* Update Makefile

Co-Authored-By: Jesse Hallam <jesse.hallam@gmail.com>

* Pulling platform specific prepackaged plugins

* Verify platform specific plugin binary exist when building each ARCH

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2020-01-22 13:39:02 -05:00
Jesús Espino
06fb1458ca Use always strings for cache keys (#13631)
* Use always strings for cache keys

* fixing tests

* Addressing PR review comments

* Adding the base to FormatInt

* Fix typo
2020-01-22 15:59:59 +01:00
Agniva De Sarker
d881b68a38 Set the GOBIN to install go-junit-report in the correct location (#13684)
* Set the GOBIN to install go-junit-report in the correct location

* Add missing \
2020-01-22 20:09:10 +05:30
Agniva De Sarker
adeb7ec8ff Allow GOBIN to be overriden with environment variables (#13671) 2020-01-22 17:46:41 +05:30
Miguel de la Cruz
97969a2904 Avoid taking into account guest accounts flag (#13643) 2020-01-21 17:29:54 +01:00
Ben Schumacher
d496e6a6a6 Bump app version to 5.22 (#13651) 2020-01-21 16:51:21 +01:00
Doug Lauder
173c4abb0d MM-21071 (#13564)
* replace endpoint `POST server_busy/clear` with the more RESTful idiomatic `DELETE server_busy` to clear the busy flag
2020-01-21 16:48:50 +01:00
Hossein Ahmadian-Yazdi
c4ce55f0b7 [MM-21373] Don't send verification (#13637)
* Don't send welcome email if verificaiton is off

* update code to send email but not include verification link

* Update code to not send welcome email if email notifications is off

* update failure clause
2020-01-21 19:44:14 +05:30
Agniva De Sarker
5123fe0292 Remove more instances of GOPATH from Makefile and CI (#13450)
Automatic Merge
2020-01-21 07:49:49 -05:00
Ben Schumacher
f78ba00017 Disable unused linter (#13661) 2020-01-21 13:06:15 +01:00
Ben Schumacher
ca140117d8 Bump GolangCI-Lint to v1.23.0 (#13628) 2020-01-21 09:46:11 +01:00
Eli Yukelzon
04e6911a6b GH-10438 - Rewrite existing plugin API tests to exclusively te… (#13302) 2020-01-21 10:41:28 +02:00
Maria A Nunez
ebfd332161 MM-21374 - Fixed extracting icon for prepackaged and local plugins (#13633)
* Merge upstream

* Added extracting iconData for prepackaged and local plugins

* Fixed tests

* Removed report.xml

Co-authored-by: Jason Paul Deland <9366595+jaydeland@users.noreply.github.com>
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-01-20 10:34:18 -05:00
Vladimir Lebedev
50e965510a MM-19462 - Migrate tests from "web/oauth_test.go" to use testify (#13525)
* Migrate tests from "web/oauth_test.go" to use testify

* make test cleaner
2020-01-20 15:30:13 +01:00
Jesús Espino
8861d0cb33 MM-20345: Fixing etag problem not reloading all users when needed (#13640)
* MM-20345: Fixing etag problem not reloading all users when needed

* Fixing tests
2020-01-20 15:24:14 +01:00