Claudio Costa
eeec08c071
[MM-19979] Stop sending new_user websocket event to guests ( #13191 )
...
* Stop sending new_user websocket event to guests
* Remove debug msg
* Revert go.mod/go.sum
* Fix linting issues
2019-11-28 14:24:04 +00:00
Miguel de la Cruz
2259b7f2a8
[MM-19948] Set version on module file and internal paths ( #13186 )
...
* [MM-19948] Set version on module file and internal paths
* Fixes after merge
* Fix i18n checker error
2019-11-28 14:39:38 +01:00
Martin Kraft
14bcd1f0a1
MM-18357: Adds pagination to team search. ( #12910 )
...
* MM-18357: Adds pagination to team search.
* MM-18357: Adds new client method for paginated requests.
* MM-18357: Adds feedback about non-supported pagination-permissions combo.
* MM-18357: Removes unnecessary conversion.
* MM-18357: Removes paginate parameter and uses nil on page and perpage instead.
2019-11-28 08:11:02 -05:00
catalintomai
955f8c4e8e
MM-19956: Add edit and delete post message export tests. ( #13156 )
...
* MM-19956: Add edit and delete post message export tests.
2019-11-27 21:05:53 -08:00
Doug Lauder
5abbe50258
MM-8607 Add ability to turn off non-critical services when under load ( #13212 )
...
* MM-8607: add ability to turn off non-critical services under load
* server busy invalid param unit tests
* MM-8607: rename server busy endpoints
* MM-8607: handle case where App not initialized
* MM-8607: additional unit test cases per feedback.
* MM-8607: use decorator to check isbusy when adding endpoint route
* MM-8607: rename endpoints, use struct for json
* Update api4/system.go
Fix misspelled log output
Co-Authored-By: Saturnino Abril <saturnino.abril@gmail.com >
* MM-8607: fix i18n order; max seconds for server busy expiry
2019-11-27 20:41:09 -05:00
Christopher Speller
3cb3d874b8
MM-19980 Allowing user delete command to delete bot accounts. ( #13155 )
...
Automatic Merge
2019-11-27 15:36:51 -05:00
Jesse Hallam
98bc2b1077
MM-19551: Add IsDefaultMarketplace to client config ( #13183 )
...
This exposes the necessary data to the webapp to know when to send more
detailed telemetry events.
2019-11-27 16:33:37 -04:00
Christopher Speller
0907530528
MM-20608 Updating x/crypto to support ACMEv2 ( #13201 )
...
* Updating x/crypto to support ACMEv2
* Revert test code.
2019-11-27 09:56:31 -08:00
Allen Lai
fdec1ef1f5
MM-20100: Migrate channelGuestCountsCache cache from store/sqlstore/channel_store.go to the new store/localcachelayer ( #13135 )
...
* init
* migrate
* add test
* fix channel store
* ...
* missing ')'
* change function interface
* fix build
* fix format
* Update store/localcachelayer/layer.go
Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com >
* Update store/localcachelayer/channel_guest_layer_test.go
Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com >
* im so confused why my builds are failing
* fix build
* format
* fix format
* add license header
* resolve some conflicts
* add test
* fix constant names
* fix more constants
* fix bugs
* delete unused constants
* Update store/localcachelayer/channel_layer.go
Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com >
* typo
* another typo
* get guest
* change test
* go fmt format
* change test
* remove getcountcache
* delete method from interface
* delete method
* update test
* rerun GoLang CI
2019-11-27 09:14:40 -05:00
Martin Kraft
31ac88ef69
MM-20305: Adds ability to choose whether deleted teams are included in the count query. ( #13181 )
2019-11-27 07:50:15 -05:00
Ben Schumacher
a1a2bb3130
Use predefined go command consistently ( #13216 )
2019-11-26 19:37:41 +01:00
Rodrigo Villablanca Vásquez
75c4fcb87e
MM-17006: An http 404 response code is returned when deleting a non existent plugin ( #11631 )
...
Automatic Merge
2019-11-26 06:36:51 -05:00
Ben Schumacher
c68f021809
Fix naming for CLI plugin list command ( #13065 )
2019-11-26 09:41:44 +01:00
Rodrigo Villablanca Vásquez
27375cd081
Migrate profileByIdsCache cache to cache layer ( #13133 )
...
* Partial advances
* Small advances
* invalidating cache with doInvalidateCacheCluster
* Renamed cache
* Starting with tests (failing by now)
* Passing tests :)
* Passing tests
* Fix ineffectual assignment in tests
* Revert of backward incompatible change
* Removed unused var
2019-11-25 21:18:01 +01:00
larkox
22b495b2df
[GH-13058] Migrate webhookCache from store/sqlstore/webhook_st… ( #13091 )
...
* Migrate webhookCache from store/sqlstore/webhook_store.go to the new store/localcachelayer
* Remove duplicated statistics and move several functions to the layer
* Put cache size in format minutes * 60seconds
* Move cache functions to layer functions over the caches
* Directly remove and purge caches in handleClusterInvalidate to avoid loops
2019-11-25 20:44:52 +01:00
Agniva De Sarker
e1adfb0d47
Run golangci-lint on EE packages if present ( #13143 )
...
The Go toolchain doesn't work with symlinks. Hence we need to explicitly
mention the directory name for it to work.
2019-11-25 18:54:54 +01:00
Agniva De Sarker
5c41c8b173
Pin golangCI to a specific version ( #13142 )
...
Automatic Merge
2019-11-22 10:06:51 -05:00
larkox
d3c607f5c6
Fix error: Tests fail due to changes in MinIO default port ( #13108 )
...
Automatic Merge
2019-11-22 09:06:51 -05:00
Martin Kraft
906f8dccef
MM-19917: Removes use of unindexed Posts.EditAt field in compliance query. ( #13078 )
2019-11-22 08:12:41 -05:00
Elias Nahum
3e9cd464de
MM-20347 Move ID Loaded Push Notifications to E20 ( #13185 )
...
* Move ID Loaded Push Notifications to E20
* Fix model tests
2019-11-21 19:35:19 -03:00
Claudio Costa
0b00a7870b
Invalidate channel members cache when promoting/demoting a guest ( #13180 )
2019-11-21 16:08:47 +01:00
Miguel de la Cruz
f7e93db512
[MM-16768] Add support for Elasticsearch v7 ( #12537 )
...
* [MM-16768] Add support for Elasticsearch v7
* Fix i18n
* Adds external services tracking to the telemetry
* Rebuild elasticsearch interface mock
* Rename diagnostics keys
* Fix merge change
2019-11-21 13:04:21 +01:00
Rodrigo Villablanca Vásquez
3a8fb53f3e
Migrates the lastPostsCache from PostStore into cache layer ( #13141 )
...
* Some advances
* Partial advances
* Cache moved
* Tests finished
* Removed all test for PostStore (store/sqlstore) related with Cache. This is tested in the cache layer now
2019-11-20 15:03:08 +01:00
Sven Hüster
85960abb08
add group filter support to ldap-check.sh ( #11935 )
...
* add group filter support to ldap-check.sh
* Update scripts/ldap-check.sh
Co-Authored-By: George Goldberg <george@gberg.me >
2019-11-20 13:52:26 +00:00
Agniva De Sarker
0f36649d22
Remove megacheck from Makefile ( #13096 )
...
Automatic Merge
2019-11-20 06:26:52 -05:00
Martin Kraft
0212845385
MM-18356: Adds ability to paginate channel search. ( #12830 )
...
* MM-18356: Adds ability to paginate channel search.
* MM-18356: Minor refactor.
* MM-18356: Adds doc.
* MM-18356: Fixes doc.
* MM-18356: Some commentary, adds the total count to non-paginated responses, and removes a stray fmt.
* MM-18356: Fixes shadowed variable.
* MM-18356: Removes paginate field and API parameter.
* MM-18356: Adds method to check if channel search is a paginated request.
* MM-18356: Vet fix.
2019-11-19 11:38:49 -05:00
Harrison Healey
608a137d2b
Fix new linting issues
2019-11-19 10:05:04 -05:00
Harrison Healey
de913e7537
Merge branch 'master' into mark-as-unread
2019-11-19 09:45:03 -05:00
larkox
c40f0a4aea
[GH-13070] Migrate emojiIdCacheByName cache from store/sqlstore/emoji_store.go to the new store/localcachelayer ( #13125 )
...
Automatic Merge
2019-11-19 05:26:52 -05:00
catalintomai
1aca43d401
MM 17466 : Add custom post types to compliance exports ( #13149 )
...
Automatic Merge
2019-11-19 03:56:52 -05:00
larkox
2b52e1af0d
[GH-13106] Migrate channelMemberCountsCache cache from store/sqlstore/channel_store.go to the new store/localcachelayer ( #13128 )
...
* Migrate channelMemberCountsCache cache from store/sqlstore/channel_store.go to the new store/localcachelayer
* Move cache functions to layer functions over the caches
* Directly remove and purge caches in handleClusterInvalidate to avoid loops and prepare details for layer with multiple caches
2019-11-19 09:55:01 +01:00
Ali Farooq
a6e992ae74
MM-16368 - Plugin Signing ( #13017 )
...
* [MM-18757] POST handler for `/plugins/marketplace` (#12372 )
* Implement installMarketplacePlugin
* Add InstallMarketplacePlugin endpoint
* Fix go.mod
* merge with master
* Fix go.mod
* Fix plugin tests
* Move get plugin to marketplace client
* Fix stylistic concerns
* Add trailing newline to the go.mod
* [MM-16586] Add plugin signature settings (#12390 )
* MM-17149 - Extend config.json for marketplace settings (#11933 )
* MM-17149 - Extend config.json for marketplace settings
* Renamed MarketplaceUrl, tracking default marketplace url
* Added EnableMarketplace to the client config
* Revert "Added EnableMarketplace to the client config"
This reverts commit 0f982c4c66 .
* MM-17149 - Added EnableMarketplace to the client config (#11958 )
* Added EnableMarketplace to the client config
* Moved EnableMarketplace setting out of limited client configuration
* Add public key settings to the config.json
* Rename PublicKeys to SignaturePublicKeyFiles
* Change filepath.Split to Base
* Remove additional prints
* Force extention of a public key file
* Remove config validation
* Remove error on delete
* Remove config cloning
* Add error messages
* Add plugin public key tests
* Rename extension to PluginSignaturePublicKeyFileExtention
* Remove EnforceVerification
* Change []*PublicKeyDescription to []string
* Change .asc extension to .plugin.asc
* Change ordering of public methods
* Change plugin key commands
* Update examples in the plugin key commands
* Remove forcing extention
* Add verify signature in settings
* Fix tabbing
* Fix naming
* Remove unused text
* Remove unused text
* Update command examples
* Fix unit tests
* Change errors.New to errors.Wrap
* Fix verbose flag
* Change .asc to .gpg
* Fix }
* Change AddPublicKey signature
* Change public.key extension
* Add plugin public key command tests
* Update en.json
* Bootstrap the public keys
* Update en.json
* Fix en.json
* Fix en.json
* Bootstrap hard-coded public key
* Remove unused texts in en.json
* Change file to name
* Add license header
* Update development public key
* Remove writeFile method
* Remove .plugin.asc extension
* Rename publiKey to mattermostPublicKey
* Remove init_public_keys string
* GolangCI
* Closing file handlers
* Fixed test that was installing nps plugin
* [MM-19798] Implement plugin signature verification (#12768 )
* MM-17149 - Extend config.json for marketplace settings (#11933 )
* MM-17149 - Extend config.json for marketplace settings
* Renamed MarketplaceUrl, tracking default marketplace url
* Added EnableMarketplace to the client config
* Revert "Added EnableMarketplace to the client config"
This reverts commit 0f982c4c66 .
* MM-17149 - Added EnableMarketplace to the client config (#11958 )
* Added EnableMarketplace to the client config
* Moved EnableMarketplace setting out of limited client configuration
* Add public key settings to the config.json
* Rename PublicKeys to SignaturePublicKeyFiles
* Change filepath.Split to Base
* Remove additional prints
* Force extention of a public key file
* Remove config validation
* Remove error on delete
* Remove config cloning
* Add error messages
* Add plugin public key tests
* Rename extension to PluginSignaturePublicKeyFileExtention
* Remove EnforceVerification
* Change []*PublicKeyDescription to []string
* Change .asc extension to .plugin.asc
* Change ordering of public methods
* Change plugin key commands
* Update examples in the plugin key commands
* Remove forcing extention
* Add verify signature in settings
* Fix tabbing
* Fix naming
* Remove unused text
* Remove unused text
* Update command examples
* Fix unit tests
* Change errors.New to errors.Wrap
* Fix verbose flag
* Change .asc to .gpg
* Fix }
* Change AddPublicKey signature
* Change public.key extension
* Add plugin public key command tests
* Update en.json
* Bootstrap the public keys
* Update en.json
* Fix en.json
* Fix en.json
* Bootstrap hard-coded public key
* Remove unused texts in en.json
* Change file to name
* Add license header
* Implement plugin signature verification
* Remove benburker openpgp
* Update en.json
* Update development public key
* Add support of multiple signatures in filestore
* Update en.json
* Run go mod vendor
* Fix style
* Remove writeFile method
* Remove .plugin.asc extension
* Rename publiKey to mattermostPublicKey
* Verify plugin with mattermost public key
* Remove init_public_keys string
* Add InstallPluginWithSignature method and Refactor
* Add signature verification on claster notification
* Remove armored signature headers
* Add error strings
* Fix en.json
* Change signatureStorePath
* Implement minor fixes
* Refactor plugin install methods
* Add installPlugin method to uploadPlugin
* Update en.json
* Refactor installPlugin
* Limit number of signatures
* Close signatures
* Fix helper function
* Fix fromReadCloseSeekerToReadSeeker
* Cleaned up ReadCloseSeeker for signatures
* Remove signature truncation on FS
* GolangCI
* Add tests for armored signatures and plugin uploads
* Fix nil slice issue
* Fix TestPluginSync
* Fixed tests
* Return io.ReadSeeker from downloadFromUrl
* Add log for the found plugins in the file store
* Remove logging plugin detection info
* [MM-20134] Consume and store single-signature for each plugin (#13081 )
* Consume and store single-signature for each plugin
* Fix en.json
* Remove saveSignature method
* Remove public key hash
* PR Feedback
* refactored config
* PR feedback
2019-11-18 19:02:41 -05:00
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
Harrison Healey
2f066da704
Rename unclear variable
2019-11-18 10:27:47 -05: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
Harrison Healey
3f99923ed4
Merge branch 'master' into mark-as-unread
2019-11-13 15:33:47 -05:00