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

11822 Коммитов

Автор SHA1 Сообщение Дата
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
scott lee davis
516017d3c9 MM-18068 Route integration actions to plugins without hitting the network (#12156)
* wip

* plugin Action requests doesn’t make external request

* import formatting fix

* changes requested in review by @lieut-data

* wip

* wip pointer

* added review changes requested by @lieut-data

* condense relative plugin url tests

* changes based on review by @crspeller

* gofmt
2019-11-06 05:39:59 -05:00
Clément Collin
5f91c14576 [MM-18676] Add tag annotations to plugin server API methods (#12701)
* [MM-18676] Add tag annotations to plugin server API methods

- With mattermost-developer-documentation/pull/383, it will allow to group methods by tag in documentation index

* Refine tag annotations in plugin API documentation

- Replace "Profile" by "User"
- Add additional tags to multi purpose methods
- Add "Group" tag
- Add tags to new methods
2019-11-06 07:49:28 +01:00
Christopher Speller
428454cee4 Adding interplugin communication. (#12829)
* Adding interplugin communication.

* Naming changes and moving ResponseTransfer to own file.

* Fix.

* Tests and moving to buffering bytes.

* Switching API to passing plugin ID through path rather than a header.

* Review feedback.
2019-11-04 17:35:58 -08:00
Daniel Schalla
501da809f3 [CR-458] Enhance Logs Endpoint Message (#12984)
* Make it possible to identify log entries created via the post API endpoints

* Clarify wording
2019-11-04 10:03:59 -08:00
Rajat Varyani
ac8e3a853c Add gorilla/handlers dependency as it is used in enterprise version (#12991)
* Add gorilla/handlers dependency as it is used in enterprise version

* Remove unused dependencies
2019-11-04 09:48:25 -08:00
Nicolas Le Cam
2ea0c669f6 Update minimum Safari supported version to 12 (#12912) 2019-11-04 11:01:29 -05:00
Witold Konior
159dec03a6 [MM-19355] Migrate tests from "store/storetest/user_store.go" (#12732)
* [MM-19355] Migrate tests from "store/storetest/user_store.go" to use testify

* fix error message

* make shadow happy!

* fix type casting in equal

* use assert instead of require to soft fail for email updates
2019-11-04 08:50:17 -05:00
Gervasio Marchand
1db045bce3 MM-16822 - Implement KVSetWithOptions (#11818)
* Add SetWithOptions

* Avoid passing two structs to the functions

* Rename ExpiryInSeconds -> ExpireInSeconds

* Use t.Run for the tests

* Fix build

* Address feedback

* Update log message

* Update docs and use KVSetWithOptions in KVCompareAndSetJSON

* Improve code style

* Use struct instead of pointer to struct

* Fix minimum server versions

* Update documentation

* Address feedback

* Revert new implemention of kv helpers

* Adress feedback
2019-11-04 13:49:54 +01:00
Ben Schumacher
812c40a307 Adjust govet settings and fix issues found by it (#12947) 2019-11-04 13:47:59 +01:00
Amy Blais
3a1deeaac5 Update en.json (#12684) 2019-11-04 13:47:23 +01:00
Adarsh K Kumar
cacdda702e MM-19663 | Migrate brand_test and cluster_test to testify (#12935)
* MM-19663 | Migrate brand_test and cluster_test to testify

* Use require.Fail instead of require.FailNow

Co-Authored-By: Ben Schumacher <ben.schumacher@mattermost.com>
2019-11-03 17:13:22 +02:00
Ben Schumacher
a2adf7b3f5 Run unused against codebase (#12968)
* Remove unused methods

* Fix missed issues
2019-11-01 23:08:01 +01:00
Joshua Bezaleel Abednego
63a28700f5 [MM-12623] Create CLI command "config reset" (#10296) 2019-11-01 19:29:02 +01:00
Nikhil Ranjan
3687a0b6c1 Migrate tests from store/storetest/status_store.go to use test… (#12873) 2019-11-01 12:52:18 +01:00
Ben Schumacher
0b24c336b3 Fix golangci-lint target (#12985) 2019-10-31 15:53:40 -05:00
Christopher Poile
0697f5206c [MM-16437] Plugin crashes the server when calling WriteHeader with an invalid http code (#11276)
* [MM-16437] add a check so that we don't write an invalid header

* better solution

* * passing in the logger; logging the error; fixed a spelling mistake

* trigger jenkins
2019-10-31 13:27:49 -04:00
catalintomai
7c658a98f0 MM-18060: Include deleted posts in compliance export. (#12957) 2019-10-31 09:31:18 -07:00
jfrerich
f3716caba9 [MM-18331] When patching a bot send websocket notification (#12373)
* When patching a bot, perform these two additional steps:

1. Update the user.UpdateAt value for the user/bot.

2. send the websocket event so all clients know a user update has
occured. This will tell clients to update the displayname

* Add check for UpdateAt.  Check that createdBot.UpdateAt is not equal
to patchedBot.UpdateAt

* re-add unintentional empty line delete in previous commit

* Don't create a fake updateAt time.  Let the Update() method handle the
change. User the returned updateUser for sending updated user event
2019-10-31 11:25:19 -05:00
Claudio Costa
422f377c96 [MM-19473] Fix data race on user login (#12870)
* Avoid writes to App.Session outside the app layer

* Fix merge

* Remove unneeded else condition
2019-10-31 12:50:43 +01:00
Luke Kingland
6f6eb13a47 license, openGraph tests: convert to testify (#12919) 2019-10-31 12:19:19 +01:00
Luke Kingland
8c3dcadbd7 oauth_test: use testify (#12949)
* oauth_test: use testify

* oauth_test: use assert in most cases, correct param order
2019-10-31 10:47:51 +01:00
Shota Gvinepadze
b208bbc43e [MM-18830] Unhelpful error message when adding bot to a channel before adding to team (#12844)
* Fix error message

* Rename User to Username

* Add '@' to the username
2019-10-31 12:49:50 +04:00
Luke Kingland
df0bb8aaa0 emoji_test: update to use testify (#12932)
* emoji_test: update to use testify

* emoji_test: use testify builtin Len check, and add missing err check
2019-10-31 12:44:27 +04:00
Ali Farooq
e4ed763e2a MM-19310 - Wrong validation message when Bot name ends in a . (#12905)
* MM-19310 - Wrong validation message when Bot name ends in a .

* Reverting back old behaviour
2019-10-30 17:00:43 -04:00
Nikhil Ranjan
a221c52acb Migrate tests from store/storetest/oauth_store.go to use testify (#12875) 2019-10-30 19:37:36 +01:00
Romain FOYARD
4111ffdb4d Include extra metadata when clicking an interactive button (#12697)
* Include user_name, team_domain and channel_name when clicking an interactive button

* Fixed api4's TestPostActionCookies test

* Moved team database request to improve concurrency.
Renamed TeamDomain to TeamName.

* Further optimizations to database requests

* Removed useless goroutine when fetching channel
2019-10-30 10:36:14 -07:00