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

1503 Коммитов

Автор 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
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
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
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
Scott Bishel
a1f9705c33 MM-19866: Remove Digest setting (#13013)
Automatic Merge
2019-11-13 08:54:02 -05: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
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
Scott Bishel
e07e114def don't clear AuthService/AuthData if user is System Admin (#12986) 2019-11-07 12:12:37 -07: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
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
catalintomai
7c658a98f0 MM-18060: Include deleted posts in compliance export. (#12957) 2019-10-31 09:31:18 -07: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
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
George Goldberg
1b95ee9834 MM-19553: Generate valid passwords on bulk import. (#12871)
This changes the bulk import so when it needs to generate a password
because no password or auth data was supplied, it now takes into account
the configured minimum length, as well as assuming all other distinct
character types are configured to be required. It should now generate
valid passwords regardless of the password policy configuration in the
Mattermost configuration file.
2019-10-30 16:57:51 +00:00
Ben Schumacher
38c0bde7f8 Run ineffassign against codebase (#12925) 2019-10-29 15:04:28 +01:00
Ben Schumacher
7a665aacdd Run gosimple against codebase (#12928) 2019-10-29 07:45:09 +01:00
413x
ef5a5d574f GH-12630 Migrate tests from model/file_info_test.go to use testify (#12647)
* Rewrite tests on testify for model/file_info_test.go
2019-10-28 16:44:20 +01:00
Ben Schumacher
e61340c54e Run gofmt -s against codebase (#12943) 2019-10-28 06:08:08 -07:00
Ben Schumacher
8a72ed2833 Fix unnecessary type conversions (#12927) 2019-10-28 10:57:21 +01:00
Guillermo Vayá
f58e2ffd0f [MM-19344] add option to render latex (#12907) 2019-10-25 13:58:48 -04:00
Mrigank Krishan
0652e121ec use testify in "model/session_test.go" (#12644)
Migrate tests from "model/session_test.go" to use testify
2019-10-24 10:04:50 +01:00
Jesse Hallam
a96565671d MM-19477: model extra manifest data (#12823)
Model `HomepageURL` and `SupportURL` for use in listing plugins in the marketplace.
2019-10-23 10:45:58 +02:00
Jesse Hallam
8c151f1f2f MM-19516: fix production marketplace url (#12822)
We changed the production marketplace URL to `api.integrations.mattermost.com`, but I never backported https://github.com/mattermost/mattermost-server/pull/12378 to v5.16, and we shipped with the invalid marketplace.integrations.mattermost.com instead.

While we've added the old hostname to enable the functionality immediately for v5.16 customers, I'd like to patch this properly for an eventual future deprecation of the old hostname.

This change should be backported alongside the PR above.
2019-10-18 10:27:26 -03:00
Peeyush Gupta
fffcef0b00 MM-19234 Migrate tests from model/team_member_test.go to use testify (#12642) 2019-10-17 09:22:55 -04:00
Ben Schumacher
ad474cb0d9 [MM-18592] Add IconPath field to plugin manifest (#12189) 2019-10-15 23:25:50 +02:00
Shodiq Muhammad
b43b84807e change t.Fatal to assert.Equal in post_list_test.go (#12678) 2019-10-15 23:05:58 +02:00
Jesper Hansen
bc1ae7e93e MM-19237: convert t.Fatal to use require calls (#12660) 2019-10-15 23:04:38 +02:00
Sascha Andres
ade6044441 MM-19135 Migrate tests from "model/channel_member_test.go" to… (#12651) 2019-10-15 11:48:06 +03:00
Scott Bishel
06866952b6 MM-16861: Support Guest Authentication via AD/LDAP (#12690)
* Add config settings for LDAPSettings GuestFilter

* make error unique

* Update model/config.go

Co-Authored-By: Martin Kraft <martin@upspin.org>

* add LdapSetting isempty_guest_attribute to diagnostics.go
2019-10-14 11:38:17 -06:00
Shodiq Muhammad
6f4f06f8d4 change t.Fatal to assertions in model/outgoing_webhook_test.go (#12693)
* change t.Fatal to assertions in model/outgoing_webhook_test.go

* user assert NotNilf and Nilf, remove backticks
2019-10-13 21:39:30 +02:00
George Felix
b860355f30 Convert model/channel_test.go validation calls into assert/require calls (#12605)
* Convert model/channel_test.go t.Fatal calls into assert/require calls

* Removed blank spaces

* Changes based on suggestions coming from related task https://github.com/mattermost/mattermost-server/pull/12602#pullrequestreview-296859312
2019-10-13 21:38:58 +02:00
Vitalii Ananichev
2f5949d05e Migrate tests from "model/cluster_stats_test.go" to use testify (#12580) 2019-10-13 21:37:41 +02:00
Karan Nadagoudar
fa8e57d91a [MM-19122] Migrate tests from "model/user_access_token_test.go" to use testify (#12581)
* Migrated to testify/require and testify/assert.
2019-10-12 12:09:27 +03:00
TPaschalis
946a5c1417 Mm 19027 (#12498)
* Migrate tests from model/websocket_request_test.go to use testifyy

* Migrate tests from model/websocket_request_test.go to use testify

* Update model/websocket_request_test.go

Co-Authored-By: Miguel de la Cruz <mgdelacroix@gmail.com>

* Update model/websocket_request_test.go

Co-Authored-By: Miguel de la Cruz <mgdelacroix@gmail.com>
2019-10-11 23:00:23 +02:00
Marc Argent
97496d4e29 Migrate tests from model/search_params_test.go to use testify (#12650) 2019-10-11 19:54:04 +02:00
WonChul Heo
68fc1b6e5e Migrate assert (#12643) 2019-10-11 16:25:31 +02:00
Sai Sandeep Mutyala
bda129f36e Migrated tests from model/user_test.go to use testify (#12681) 2019-10-11 15:08:49 +02:00
Kashif Jamal Soofi
955242e404 Migrate test from user_search_test.go to use testify (#12648) 2019-10-11 15:07:51 +02:00
Simon Frey
60def7a488 Replace t.Fatal for the testify require.Equal function (#12646) 2019-10-11 15:07:17 +02:00
May
4cbbf7768d Migrate tests from "model/preference_test.go" to use testify (#12640)
* Update preference_test

* Update preference_test.go to use require package

* remove nil check for json decoder
2019-10-11 15:06:41 +02:00
Romain Maneschi
f7a8d63cd0 testify model/user_terms_of_Service test (#12639) 2019-10-11 15:06:11 +02:00
Karan Nadagoudar
b56ce0e67a Migrated t.fatal to testify/require. (#12625) 2019-10-11 15:05:36 +02:00
Sheshagiri Rao Mallipedhi
94a77e2ddb Migrate tests from "model/authorize_test.go" to use testify (#12606)
* refactor tests, move to testify tests

* replace t.Fatal with require from testify
2019-10-11 15:05:09 +02:00
Sheshagiri Rao Mallipedhi
77dc6a9544 refactor tests, move to testify tests (#12604) 2019-10-11 15:04:16 +02:00
Karan Nadagoudar
8f93d3b6f0 [MM-19140] Migrate tests from "model/command_test.go" to use testify. (#12584)
* Migrate t.Fatal to testify.

* Migrate t.Fatal to testify.

* Code refactor.

* Test case fix.
2019-10-11 15:03:46 +02:00
Sahil Sharma
b7e2fdeb37 Migrates tests for "model/initial_load_test.go" to use testify (#12582) 2019-10-11 15:00:58 +02:00