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

11848 Коммитов

Автор SHA1 Сообщение Дата
Miguel Alatzar
d44d563ef3 [MM-16232] ID loaded push notifications (#13137)
* Update BuildPushNotificationMessage (#12974)

* Update BuildPushNotificationMessage

* Included Category, Version, and Type

* Remove unnecessary function args

* [MM-16232] Build and return fetched notification (#13085)

* Build and return fetched notification

* Remove check on PushNotificationContents

* Ran i18n-extract

* Get UserId from session

* Re-add ReturnStatusOK

* Remove UserId from PushNotificationAck

* Always include channel name

* [MM-16232] Return after writing response and add default message (#13127)

* Return after writing response and add default message

* Include channel ID as well

* Localize default message

* Fix i18n
2019-11-18 15:42:51 -08:00
Jesse Hallam
2571d97723 MM-18517: Plugin Marketplace (Phase 2) (#13086)
* MM-17549: use StatusNotFound when deleting plugin (#12983)

Trying to delete a plugin that does not exist should fail with a 404, not a 400.

Relates-to: https://mattermost.atlassian.net/browse/MM-17549

* MM-19630: marketplace: model ReleaseNotesURL (#13083)

Automatic Merge

* MM-20065: allow prepackaged plugin upgrade (#13076)

* MM-20065: allow prepackaged plugin upgrade

When locally installing prepackaged plugins, skip if a plugin exists with the same id and is the same or a newer version.

This is effectively a "poor man's" rework of prepackaged plugins to allow upgrade of prepackaged plugins via the marketplace. The larger plan to rework prepackaged plugins was deferred from v5.18.

Fixes: https://mattermost.atlassian.net/browse/MM-20065

* eliminate unnecessary installPlugin

* fix TestPluginSync defaults to match minio

* cleanExistingBundles

* close prepackaged filereader

* simplify
2019-11-18 13:40:49 -04:00
Agniva De Sarker
4d1c6cd446 Remove GO111MODULE variable (#13130)
With 1.13, it is enabled by default on repos where a go.mod file is present.
2019-11-18 06:42:19 -08:00
Agniva De Sarker
3f072159e3 Remove fmt and vet checks from CI (#13063)
* Remove fmt and vet checks from CI

- golangci-lint already does the vet and fmt checks. Remove those
as it is redundant now.
- Also start running golangci-lint as part of the CI pipeline now
just as an extra layer of reliability.

* Incorporate review comments

* Adding golangci install to Jenkinsfile.pr too

* dummy commit to test jenkins

* Trying after cd to directory

* Fix ineffective assign
2019-11-18 12:08:13 +01:00
Luke Kingland
8c22455d41 reaction_test: use testify require for fatal errors (#12951) 2019-11-18 11:40:09 +01:00
Rajat Varyani
f2fcfa8f9d [MM-16709] Add helper method for plugins using MessageHasBeenPosted (#12539)
The PR introduces a method in helper interface. The method has common code for filtering to be used across plugins which use MessageHasBeenPosted.
2019-11-18 10:47:32 +01:00
Christopher Speller
9b6a0674f7 Adding ability to disable attachment buttons and fields. (#12973) 2019-11-15 14:33:32 -08:00
Jesús Espino
7031f51b41 Deactivating and invalidating sessions of guest users on guest disable (#13007)
Automatic Merge
2019-11-15 09:43:52 -05:00
Claudio Costa
6a75d2fc68 [MM-15270] Add Team.InviteId sanitization (#12952)
* Filter out InviteId in Team sanitize function

* Keep InviteId for authorized users

* Update team sanitization tests

* Improve tests and revert conflicting lines
2019-11-15 15:40:41 +01:00
Vinício Augusto
10e1fa4382 Migrate tests from "api4/user_test.go" to use testify (#12967)
* testify in api4/user_test.go

* more semantic treatments for require.Nil

* fix err shadowing

* gofmt

* trying to pass require.NoError problems

* trying to pass more require.NoError problems
2019-11-15 09:13:32 -05:00
kanozec
1e2609651b Fix typo in plugin package (#13043)
Automatic Merge
2019-11-15 07:13:38 -05:00
Alex Sahin
6b0a88debf [MM-17297] Extend EnsureBot helper to include bot images (#12153) 2019-11-15 05:19:00 +01:00
Hossein Ahmadian-Yazdi
1ed1a6be0b [MM-19740] Return error for non-system-admins/team admins/channel admins from the GET /api/v4/groups API endpoint response (#12961)
* [MM-19740] Differentiate between admin and non-admin

* [MM-19740] added testing admin and non admin

* [MM-19740] Address PR comments

* [MM-19740] Addressed PR comments

* [MM-19740] Updated en.json

* [MM-19740] Addressed PR comments

* Address PR comments

* Address PR comments
2019-11-14 09:21:23 -05:00
Hossein Ahmadian-Yazdi
2880a0af50 [MM-19309] Name Display Lock (#13018)
* WIP

* [MM-19309] Updated params

* Updated boolean value

* [MM-19309] add new struct

* Updated en.json

* Fixed golangci error

* Address PR comments
2019-11-14 08:32:20 -05:00
Carlos Tadeu Panato Junior
5ea8017db5 upgrade db to 5.17 (#13060)
Automatic Merge
2019-11-14 06:23:36 -05:00
Luke Kingland
f6f7a65659 commands_test: use testify (#12950) 2019-11-13 22:51:41 +01:00
Scott Bishel
2bcb4d9913 MM-17508: Modifying config files causes compliance exports to run twice (#13053)
* Check if leader before setting schedule.

* add check to normal run as well
2019-11-13 12:25:25 -07:00
Luke Kingland
988b8b74c5 channel_test: use testify (#12938)
Automatic Merge
2019-11-13 13:53:57 -05:00
Scott Bishel
a1f9705c33 MM-19866: Remove Digest setting (#13013)
Automatic Merge
2019-11-13 08:54:02 -05:00
Agniva De Sarker
2db6823f5d Refactor more code to use testutils.WasCalled (#13054)
* Refactor more code to use testutils.WasCalled

* incorporate review comments

* Revert watcher_test.go changes

The file is in config package and the other tests use config_test.
So it is not visible.
2019-11-13 16:11:26 +08:00
Chanwit Piromplad
0c8b580458 migrate test to use testify (#12894)
* migrate test to use testify

* use require.NotEmpty
2019-11-12 15:15:32 +01:00
ishanray
bf693b6a0c Fix typo by removing extra p in function name (#12996) 2019-11-12 15:14:57 +01:00
Shobhit Gupta
111d076a86 Migrate tests from "api4/team_test.go" to use testify (#12902) 2019-11-12 12:43:10 +01:00
kanozec
ae78449a20 Fix typo in server_app_adapters.go (#13042) 2019-11-12 12:33:05 +01:00
Jesús Espino
e9ecb8fdaa Simplifiying mail service API (#13036) 2019-11-12 12:25:21 +01:00
Sanele T. Mahlalela
c488b3c718 Fixed comments syntaxt in app config file (#13055)
fixed syntax error in comment in config.go
2019-11-12 03:20:56 -08:00
Carlos Tadeu Panato Junior
cdb61db9c4 add stop-docker to stop make command (#13020) 2019-11-12 08:32:06 +01:00
Andres
1155b08404 MM - 19155 Change plugin helpers files to be golint complied (#12686)
* MM-19155 Change plugin helpers files to be golint complied

* add makefile target that checks if plugin/helpers files are golint
  compliant

* MM-19155 - Change plugin helpers files to be golint complied

* added comment documentation to exported plugin/helpers methods
* changed variable names to be compliant with golint

* Address feedback
2019-11-12 06:29:21 +01:00
Valentijn Nieman
36f3b14420 MM-19337 Enable users to view archived channels (#12995)
* First pass at searching archived channels

* Create endpoint for archived channels

* Update test for GetPublicChannelsForTeam

* Fix unit test for archived channels

* Rename includeDeleted to onlyDeleted

* Remove new /archived endpoint in favour of existing /deleted endpoint

* Fix broken test

* Remove manage team permission from /deleted endpoint

* Fix deletedChannels test

* Test for searching archived channels

* Only return private deleted channels user was a member of

* SearchArchivedChannels also searches private channels (user is a member of)

* Remove for loop to simplify append

* Remove userId from Client4 searcArchivedChannels
2019-11-12 06:15:19 +08:00
George Goldberg
1930cc6a11 MM-19790: Remove randomness in oauth test AuthData. (#12988)
The ID field of Gitlab OAuth data was generated as a random number
between 1-1000. Unfortunately, this gave a 1 in 1 million chance of two
users generated this way colliding and meaning if you had two test users
in a test case they silently ended up actually being the exact same
user. We don't actually need to generate this randomly, so instead
change to having the test cases explicitly set the ID number so the
behaviour is as expected and completely deterministic.

As you'd expect, with odds of exactly a million to 1, it just might
(and in this case, it did indeed) happen.
2019-11-11 14:33:30 +00:00
Jesús Espino
9557bcf329 Making private the sqlstore upgrade functions because nobody needs to call them from the outside (#13023) 2019-11-11 12:11:50 +00:00
Scott Bishel
53ee077cfd MM-18005: Improve display message when attempting to add an outsider to a group-synced team via new team invite flow (#12966)
* Update group errors being returned

* update based on merge, error already added

* remove unnecessary translation

* Revert "remove unnecessary translation"

This reverts commit 5a4ae89618ddca5ea256009aab167f3e071f488c.

* remove unnecessary translation
2019-11-10 08:07:49 -07:00
Arjit Chaudhary
d9a154fc70 Refactor "app/notification_email.go" to use structured logging #12726 (#12731)
* Refactor "app/notification_email.go" to use structured logging #12726

* Update notification_email.go

* Update notification_email.go

* Update notification_email.go

* add back fmt as fmt.Sprintf calls are used for Year/Day/Minute

* Update notification_email.go

* Update notification_email.go

* Update notification_email.go
2019-11-09 09:00:45 -08:00
Jeff Abshire
7600d9c169 Remove a potential tabnabbing attack in a template. (#13024)
My company's security scanner picked up on a potential problem in this
template in our deployed Mattermost instance.

https://www.owasp.org/index.php/Reverse_Tabnabbing
2019-11-08 21:27:37 +01:00
Claudio Costa
c0c47df3f0 Fix data race on server startup (#13006) 2019-11-08 20:37:15 +01:00
larkox
613a015cd0 [GH-13031] Split tests into subtests or table testing for the file "https://github.com/mattermost/mattermost-server/blob/master/model/file_info_test.go" (#13032)
* Split tests into subtests and table testing for 'model/file_info_test.go'

* Improve error messages and fit testify function parameter order
2019-11-08 20:18:30 +01:00
Carlos Tadeu Panato Junior
c2fbcd71d1 Update minio (#12979)
* update minio docker image to latest stable available on 31/10/2019

* update minio-go dependencies
2019-11-08 15:43:34 +01:00
Scott Bishel
e07e114def don't clear AuthService/AuthData if user is System Admin (#12986) 2019-11-07 12:12:37 -07:00
Nikhil Ranjan
540cfb0239 Migrate tests from store/storetest/team_store.go to use testify (#12877)
* Migrate tests from store/storetest/team_store.go to use testify

* fix test

* fix varible declaration

* fix tests

* casting int64 to int for Equal check

* fix int64 int Equal check

* changes as per review
2019-11-07 20:01:32 +05:30
Abhishek Mane
5646b12686 (fixed) Refactor app/status.go to use structured logging #12723 (#12754) 2019-11-07 13:02:41 +01:00
Abu Hanifa
d37a58fe3a convert t.fatal into require (#12899) 2019-11-07 13:01:54 +01:00
Jesse Hallam
d99cf0864e MM-19477: update manifest documentation example (#13016)
Illustrate `homepage_url`, `support_url`, and `icon_path` in the GoDoc for model.Manifest.

Relates-to: https://mattermost.atlassian.net/browse/MM-19477
2019-11-06 18:22:18 -05:00
Lev
a7c1514d8e Bumped Zoom plugin to v1.1.2 (#13008)
* Bumped Zoom plugin version to 1.1.0

* Bumped Zoom plugin version to 1.1.1

* Bumped Zoom plugin to v1.1.2
2019-11-06 13:25:52 -08:00
Nikhil Ranjan
ad1ab6b038 Migrate tests from "store/storetest/webhook_store.go" to use testify (#12736)
* change t.Fatal calls to use testify require

* fix already defined err

* changes as per review comments

* changes as per review

* err is not nil
2019-11-06 21:40:50 +01:00
Akshay Chhajed
5b89cdcb6b GH-12888 Modify api4/config_test.go to use testify (#12946) 2019-11-06 20:51:30 +01:00
Jesse Hallam
6a906e91ad enable non-GOPATH testing with different mattermost-server folder name (#12930)
* enable non-GOPATH testing

Tweak the testlib package to support finding the root without assuming the folder name of the repository.

Fixes: MM-19729

* fix web tests
2019-11-06 14:46:51 -05:00
Rajat Varyani
14b1777959 [MM-19153] Add server version check in helper methods for plugins (#12675) 2019-11-06 17:42:46 +01:00
Rodrigo Villablanca Vásquez
a39f4f1064 Change the minor version of go to 1.13 (#13015)
* Changed go minor version 12 -> 13

* REQUIREDGOVERSION set to 1.13.0
2019-11-06 07:04:50 -08:00
Jesús Espino
8febdcf2b8 Removing unnecesary unnused old layered store (#12999) 2019-11-06 12:43:41 +01:00
Shobhit Gupta
a85c653f87 Migrate tests from "store/storetest/emoji_store.go" to use tes… (#12913) 2019-11-06 12:37:35 +01:00