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
Martin Kraft
50e9aa01c3
MM-21157: Triggers role sync when a syncable is linked, unlinked, or updated. ( #13432 )
...
* MM-20644: Add users to teams as a SchemeAdmin based on a new configuration field on GroupTeams and GroupChannels records.
* MM-20644: Adds SchemeAdmin to mapping of the GroupSyncable struct fields.
* MM-2064: Adds test to ensure SchemeAdmin field value is mapped.
* MM-20644: Adds missing index creation for fresh DBs.
* MM-20644: Duplicates UpdateMembersRole across Team and Channel stores. Adds tests.
* MM-20644: Fixes some old method name references.
* MM-20644: Moves variable declaration; removes Println statement.
* MM-21157: Triggers role sync when a syncable is linked, unlinked, or updated.
* MM-20644: Use a SQL query instead of two to update Team and Channel members.
* MM-20644: Fixes tests; updates query.
* MM-21157: Removes second invocation of function because of refactor that performs it all in a single query.
* MM-21157: Switches a few queries to Squirrel.
* MM-21157: SQL-formats some strings.
* MM-21157: Select with list.
* MM-21157: Converts some more sql to squirrel.
* MM-21157: Fix incorrect conflict resolutions.
* MM-21157: Fix incorrect conflict resolutions.
* MM-21157: Adds missing mocks.
* MM-21157: Clears cache upon syncing roles.
Co-authored-by: mattermod <mattermod@users.noreply.github.com >
2020-01-20 09:10:25 -05:00
Andy Librian
3865bc501e
golint fix ( #13613 )
2020-01-20 12:32:20 +01:00
Bolarinwa Balogun
2186af4d13
Convert store/storetest/post_store.go t.Fatal to assert/require ( #13608 )
2020-01-18 20:53:42 +01:00
Jesse Hallam
6d79484e55
MM-21645: COALESCE(Bots.LastIconUpdate, 0) ( #13638 )
...
Handle a potentially `NULL` Bots.LastIconUpdate and `COALESCE` back to `0`. This column has no default, and while v5.20 should never write it as `NULL`, any pre-v5.20 server writing to the new schema will. As a result, this change ensures backwards compatibility.
Fixes: https://mattermost.atlassian.net/browse/MM-21645
Fixes: https://mattermost.atlassian.net/browse/MM-21585
2020-01-17 17:16:18 -04:00
Shobhit Gupta
7d99d8fba7
Add IsValid method to *Manifest struct ( #13609 )
2020-01-17 21:08:55 +01:00
Scott Bishel
b71a6b9f8d
MM-21725 change to singular ( #13634 )
2020-01-17 19:22:41 +05:30
Ben Schumacher
3491c3abb2
Respect HomepageURL in manifest for local plugins ( #13595 )
...
* Respect HomepageURL in manifest for local plugins
* Add documentation for updating the plugin signatures
2020-01-17 09:09:58 +01:00
Someone
566f28be0a
GH-12702 v2: Add new command response parameter: "skip_slack_p… ( #13420 )
...
Add new command response parameter: "skip_slack_parsing". Skips Slack magic if set to "true". (#12702 )
2020-01-17 08:34:11 +01:00
Jesse Hallam
4314a0427f
MM-21328: Fix KVCompareAndSet when new==old ( #13612 )
...
`KVCompareAndSet(key, sameValue, sameValue)` can fail spuriously on MySQL if the underlying `UPDATE` requires no actual changes. As per the [MySQL documentation](https://dev.mysql.com/doc/refman/8.0/en/mysql-affected-rows.html ), we can't rely on rows affected in this case:
> For UPDATE statements, the affected-rows value by default is the number of rows actually changed. If you specify the CLIENT_FOUND_ROWS flag to mysql_real_connect() when connecting to mysqld, the affected-rows value is the number of rows “found”; that is, matched by the WHERE clause.
It's not tenable to change `CLIENT_FOUND_ROWS` for the all connection, so handle this case in the code instead by running a `SELECT` after the fact. Note that `KVCompareAndSet` has no guarantee of atomicity in this case, but neither would `CompareAndSwap` on which this is method was inspired.
Finally, note that no changes are required for Postgres, which has sane semantics as the default.
Fixes: https://mattermost.atlassian.net/browse/MM-21328
Co-authored-by: mattermod <mattermod@users.noreply.github.com >
2020-01-16 15:29:10 -04:00
Maria A Nunez
c21ea5bc06
MM-19445 - Added version information to plugin diagnostics data ( #13408 )
...
* MM-19609 - Add new prepackage configuration settings (#13062 )
* Add signatures to the prepackaged plugins (#13138 )
* MM-19612 - Support querying local plugin marketplace when upst… (#13250 )
* MM-19612 - Support querying local plugin marketplace when upstream unavailable or disabled
* Update translations file
* Fixed comment
* Updated to check EnableRemoteMarketplace setting and LocalOnly to get marketplace plugins
* Fixed unit tests
* Tests cleanup code
* Removed unused error message
* Updated tests
* MM-19614- Updated Marketplace Service error id (#13388 )
* Added version information to plugin diagnostics data
* [MM-19610] Consume prepackaged plugins (#13005 )
* consume prepackaged plugins into memory
* missing i18n
* remove spurious .gitignore changes
* return on failure to install prepackged plugins
* cleanup
* s/plugins/availablePlugins
* whitespace
* don't return extractDir when not needed
* s/plug/plugin
* error on icon, cleanup
* update armored version of testplugin signature
* honour AutomaticPrepackagedPlugins
* document getPrepackagedPlugin
* MM-19613 - Include prepackaged plugins in marketplace results (#13433 )
* Added prepackaged plugins to marketplace results
* PR Feedback
* PR Feedback
* Update error where definition
* Removing unnecessary var declaration
* Updated comments
* MM-21263 - Use EnableRemoteMarketplace in marketplace install… (#13438 )
* MM-21263 - Use EnableRemoteMarketplace in marketplace install endpoint
* Call updateConfig before calling NewServer in TestHelper
* Added translations
* PR feedback
* Translations
* Feedback
* s/helpers.go/download.go
* Converging env.PrepackagedPlugins
* Initial PR feedback
* Ordered imports properly
* Updated DownloadURL to return slice of bytes
* Fixed method typo
* Fixed logging
* Added read lock for prepackaged plugins list
* PR Feedback
* Added condition to only install prepackaged plugin if it was previously enabled
* Linting
* Updated to check plugin state in config
* Flatten out version number to its own entries. Added webex
* Updated tests
Co-authored-by: Ali Farooq <ali.farooq0@pm.me >
Co-authored-by: Shota Gvinepadze <wineson@gmail.com >
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com >
2020-01-16 08:46:36 -05:00
Martin Kraft
3d5f36cc4a
MM-12773: Return error if ChannelMemberHistory record creation fails. ( #13517 )
...
* MM-12773: Fail if creating ChannelMemberHistory record fails.
* MM-12773: Guard against attempting to create duplicate channel member history record.
2020-01-16 17:13:32 +05:30
Agniva De Sarker
2a28edcd93
MM-21481: Fixed several issues from user marshalling ( #13627 )
...
* MM-21481: Fixed several issues from user marshalling
- Fixed the root cause for panic by properly converting
the map to a User struct.
- Added a check for type conversion for extra safety.
- Fixed a somewhat unrelated issue of a pointer to pointer reference.
* Fix tests
2020-01-16 09:18:08 +01:00
Maria A Nunez
87eb7697f9
MM-19606- Rework Prepackaged Plugins ( #13449 )
...
* MM-19609 - Add new prepackage configuration settings (#13062 )
* Add signatures to the prepackaged plugins (#13138 )
* MM-19612 - Support querying local plugin marketplace when upst… (#13250 )
* MM-19612 - Support querying local plugin marketplace when upstream unavailable or disabled
* Update translations file
* Fixed comment
* Updated to check EnableRemoteMarketplace setting and LocalOnly to get marketplace plugins
* Fixed unit tests
* Tests cleanup code
* Removed unused error message
* Updated tests
* MM-19614- Updated Marketplace Service error id (#13388 )
* [MM-19610] Consume prepackaged plugins (#13005 )
* consume prepackaged plugins into memory
* missing i18n
* remove spurious .gitignore changes
* return on failure to install prepackged plugins
* cleanup
* s/plugins/availablePlugins
* whitespace
* don't return extractDir when not needed
* s/plug/plugin
* error on icon, cleanup
* update armored version of testplugin signature
* honour AutomaticPrepackagedPlugins
* document getPrepackagedPlugin
* MM-19613 - Include prepackaged plugins in marketplace results (#13433 )
* Added prepackaged plugins to marketplace results
* PR Feedback
* PR Feedback
* Update error where definition
* Removing unnecessary var declaration
* Updated comments
* MM-21263 - Use EnableRemoteMarketplace in marketplace install… (#13438 )
* MM-21263 - Use EnableRemoteMarketplace in marketplace install endpoint
* Call updateConfig before calling NewServer in TestHelper
* Added translations
* PR feedback
* Translations
* Feedback
* s/helpers.go/download.go
* Converging env.PrepackagedPlugins
* Initial PR feedback
* Ordered imports properly
* Updated DownloadURL to return slice of bytes
* Fixed method typo
* Fixed logging
* Added read lock for prepackaged plugins list
* PR Feedback
* Added condition to only install prepackaged plugin if it was previously enabled
* Linting
* Updated to check plugin state in config
* Closing filereader
* Only add local label if remote marketplace is enabled
* Updated local tag description
* Fixed tests
Co-authored-by: Ali Farooq <ali.farooq0@pm.me >
Co-authored-by: Shota Gvinepadze <wineson@gmail.com >
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com >
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com >
2020-01-15 13:38:55 -05:00
Claudio Costa
508fbf2f53
Make LocalCacheUserStore.Get/GetProfileByIds return a copy of the stored data ( #13620 )
2020-01-15 19:01:04 +01:00
Jason Frerich
a001ecabe2
Update bundled plugins for v5.20 ( #13621 )
2020-01-15 10:30:58 -06:00
Eli Yukelzon
8e0fe90897
Thread fetching revert ( #13616 )
...
* Revert "MM-19371 - Reply count disappears from pinned and flagged conv… (#12753 )"
2020-01-15 17:14:04 +02:00
Carlos Tadeu Panato Junior
da97740cc2
bump alpine version and mm as well ( #13615 )
2020-01-15 16:07:09 +01:00
Scott Bishel
70a7ad2969
add additional reserved team name ( #13606 )
...
Co-authored-by: mattermod <mattermod@users.noreply.github.com >
2020-01-14 14:39:05 -07:00
Eli Yukelzon
e77ef9733c
MM-20977 - Inviting multiple users with valid/allowed and inva… ( #13372 )
2020-01-14 15:29:50 +02:00
Rajat Varyani
51a61f6bc1
[MM-19720] Expose endpoint for config patch ( #12997 )
2020-01-14 13:06:17 +01:00
Vladimir Lebedev
69f4dcd955
MM-19463 - Migrate tests from "web/webhook_test.go" to use testify ( #13524 )
...
* MM-19463 - Migrate tests from "web/webhook_test.go" to use testify
* fix shadows declaration
* make test cleaner
* fix wrong test order
Co-authored-by: mattermod <mattermod@users.noreply.github.com >
2020-01-14 11:09:11 +01:00
Ben Schumacher
6e9e849871
Fix issues found by golangci v1.22.2 ( #13568 )
2020-01-14 10:08:51 +01:00
Ben Schumacher
2d9e85e82a
[MM-20706] Drop 26 character requirement from post action IDs ( #13225 )
2020-01-14 07:18:14 +01:00
Ben Schumacher
1f3f8fbf57
[MM-21123] Add Labels to upstream Marketplace response ( #13425 )
...
* Add Labels to upstream Marketplace response
* Add LOCAL label to local plugins
2020-01-14 07:16:36 +01:00
Devin Binnie
8e2c59ca00
[MM-17155] Changes to email notifications to support Deep Linking page ( #13362 )
...
* Change link to redirect email notifications to landing page
* Fix to undefined variable
* Change `vault` to `landing`
* Added a couple tests
Co-authored-by: David Meza <dmeza@users.noreply.github.com >
Co-authored-by: mattermod <mattermod@users.noreply.github.com >
2020-01-13 16:24:28 -05:00
Vladimir Lebedev
ed555faa75
MM-19137 - Migrate tests from "model/post_test.go" to use test… ( #13521 )
...
* MM-19137 - Migrate tests from "model/post_test.go" to use testify
* revert go.sum file
Co-authored-by: mattermod <mattermod@users.noreply.github.com >
2020-01-13 15:07:41 -05:00
Scott Bishel
aa0d0f9943
MM-21102: Add ExperimentalSettings.UseNewSAMLLibrary to diagnostics ( #13543 )
...
* add UseNewSAMLLibrary to diagnostics.go
* add UseNewSAMLLibrary to diagnostics.go
* add TRACK_CONFIG_EXPERIMENTAL to expected results
Co-authored-by: mattermod <mattermod@users.noreply.github.com >
2020-01-13 23:24:30 +05:30
Hossein Ahmadian-Yazdi
dc24c9abe8
[MM-20061] Add System Admin filter to both LDAP and SAML ( #13534 )
...
* promote user to admin upon login
* Add SAML support for admin accounts
* update en.json
* update i18n
* Add tests as per comments
* change function name
* fix config.go
* invalidate cache so its not checking for cache when roles change
* add enable attribute and filter
2020-01-13 12:50:01 -05:00
Patryk Pomykalski
5f7ca55b13
MM-21520: Remove temporary databases after tests run ( #13572 )
...
* MM-21520: Remove temorary databases after tests run
* accidental test name change
Co-authored-by: mattermod <mattermod@users.noreply.github.com >
2020-01-13 16:54:07 +01:00