Commit Graph

2389 Commits

Author SHA1 Message Date
Jason Blais
8e221c1895 [MM-31018] Update email address for admin advisor contact requests to support-advisor@mattermost.com (#16443)
Automatic Merge
2020-12-15 05:15:17 +01:00
Agniva De Sarker
fa1f2a8504 MM-31323: Fix racy test TestHandleCommandResponsePost (#16542)
In https://github.com/mattermost/mattermost-server/pull/16089,
we added logic to modify the notification text in the presence
of fallback text.

Unfortunately, that created a race condition during publishing
the post via websockets. To fix this, we create a clone of the post
before sending it off for push notifications.

https://mattermost.atlassian.net/browse/MM-31323

```release-note
NONE
```
2020-12-14 14:24:12 +05:30
Haardik Dharma
609c8166f2 [MM-30911]: Change receiver name for (me *TestHelper) in app/slashcommands/helper_test.go to be more idiomatic. (#16387)
Automatic Merge
2020-12-12 15:45:17 +01:00
Haardik Dharma
0dee08fa31 Update command_me.go (#16522)
Automatic Merge
2020-12-12 07:15:17 +01:00
Haardik Dharma
caaa5690b6 Update command_echo.go (#16521)
Automatic Merge
2020-12-12 06:15:17 +01:00
Haardik Dharma
625185cb5b Update command_online.go (#16493)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-12-11 22:51:06 +05:30
Haardik Dharma
93a4c7bc7e Update command_groupmsg.go (#16487)
Automatic Merge
2020-12-11 17:45:18 +01:00
Haardik Dharma
b8e9bac921 Update command_code.go (#16486)
Automatic Merge
2020-12-11 16:45:18 +01:00
Claudio Costa
6c976c3b06 Generate preview regardless of HasPreviewImage value (#16535)
Automatic Merge
2020-12-11 00:15:17 +01:00
Haardik Dharma
7fb5476c64 Update command_channel_header.go (#16485)
Automatic Merge
2020-12-10 17:15:17 +01:00
Haardik Dharma
f2aafac0c9 Update cluster_discovery.go (#16484)
Automatic Merge
2020-12-10 16:15:18 +01:00
Agniva De Sarker
44eb3e3f97 MM-31326: Fix Striped LRU to have minimum of 1 bucket (#16531)
* MM-31326: Fix Striped LRU to have minimum of 1 bucket

https://mattermost.atlassian.net/browse/MM-31236

```release-note
NONE
```

* Using a maxInt function
2020-12-10 19:51:52 +05:30
Haardik Dharma
5f0f5a7a7f Update command_shortcuts.go (#16494)
Automatic Merge
2020-12-09 15:45:18 +01:00
Florent Peterschmitt
349b83f23a implement and use striped LRU cache to lower mutex contention (#15764)
* Implement Striped LRU cache

* ci

* fix

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-12-09 19:25:14 +05:30
Scott Bishel
f548ecbee1 MM-27688-OpenId Connect (#16222)
* implement openid connect

* update error strings

* handle OpenIdSetting.Secret as FAKE SETTING

* add openid to telemetry

* update config defaults, add telemetry

* fix bug with Office365

* Retrieve Office365 AuthData from IdToken

* fix linter

* add feature flag, reset defaults for config

* fix build error

* fix unit tests

* add authentication permission to Feature
Flags

* turn off feature flag

* set default button color

* set default button color only on openid

* fix for merging FeatureFlags in config

* remove feature flag

* revert config changes

* remove debug statements

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-12-08 19:58:37 -07:00
Hossein
d666bb8b3d Add Billing Permissions (#16364)
* add billing permissions

* update store.go

* Update permission.go

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-12-08 12:41:28 -05:00
Haardik Dharma
977ad99af6 Update command_shrug.go (#16481)
Automatic Merge
2020-12-08 18:15:18 +01:00
Haardik Dharma
81854aea5c Update command_mute.go (#16479)
Automatic Merge
2020-12-08 11:15:17 +01:00
Doug Lauder
46fc0c640c MM-30986 Move global logger init until after server logger fully configured (#16426)
- move the initGlobalLogger call to the end of initLogging so a copy of a fully configured logger is made for global logging.
2020-12-07 09:50:45 -05:00
Eli Yukelzon
86e228b6c6 MM-30558 - Add unreadReplies and unreadMentions to thread membership (#16304) 2020-12-06 10:02:53 +02:00
Ibrahim Serdar Acikgoz
cc5a12bad0 app/import_functions: fix a bug while improting for two teams (#16455)
Automatic Merge
2020-12-04 18:45:17 +01:00
Haardik Dharma
4e2a33386b [MM-30913]: Change receiver name for (me *CollapseProvider) in app/slashcommands/command_expand_collapse.go to be more idiomatic. (#16389)
Automatic Merge
2020-12-04 07:15:17 +01:00
Nick Misasi
fa5a033f66 [MM-30984] Missing payment email on billing day if no CC is present (#16442)
* Adding email and scaffolding for payment failure in case where customer has not added payment method

* Adding email template

* Remove unused boolean

* Fix error

* Add Email Us verbiage

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-12-03 16:02:43 -05:00
Claudio Costa
df906cad9d [MM-28422] Enable processing of import files through API (#16062)
* Implement unzip function

* Implement FileSize method

* Implement path rewriting for bulk import

* Small improvements

* Add ImportSettings to config

* Implement ListImports API endpoint

* Enable uploading import files

* Implement import process job

* Add missing license headers

* Address reviews

* Make path sanitization a bit smarter

* Clean path before calculating Dir

* [MM-30008] Add mmctl support for file imports (#16301)

* Add mmctl support for import files

* Improve test

* Remove unnecessary handlers

* Use th.TestForSystemAdminAndLocal

* Make nouser id a constant
2020-12-03 11:38:00 +01:00
Jesús Espino
a74fe05695 Removing supplier concept from the sql store (#16355)
* Removing supplier concept from the sql store

* Removing other metions to supplier

* Fixing gofmt

* Fixing gofmt

* Renaming NewSqlStore to New

* Fixing tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-12-02 12:06:23 +01:00
Agniva De Sarker
fc60a1e8dd MM-30988 - Fix racy test ServerSystemdNotification (#16431)
* MM-30988 - Fix racy test ServerSystemdNotification

The translateFunc is a global variable which was unguarded.
So we convert that into an atomic variable to prevent against races.

https://mattermost.atlassian.net/browse/MM-30988

```release-note
NONE
```

* fix tests

* move call upwards

* use race

* after translations init

* guard with a sync.Once

* missed import

* revert race

* update timeout
2020-12-02 14:22:41 +05:30
Haardik Dharma
e22669c403 [MM-30915]: Change receiver name for (me *JoinProvider) in app/slashcommands/command_join.go to be more idiomatic. (#16391)
Automatic Merge
2020-12-02 07:15:18 +01:00
Haardik Dharma
06543656ea [MM-30914]: Change receiver name for (me *InviteProvider) in app/slashcommands/command_invite.go to be more idiomatic. (#16390)
Automatic Merge
2020-12-02 06:15:18 +01:00
Agniva De Sarker
6ed90bf1db MM-30987- Fix race in setting clearNotify in Busy (#16430)
A time.AfterFunc runs the function in its own goroutine. So we need
to guard that with a mutex too.

https://mattermost.atlassian.net/browse/MM-30987

```release-note
NONE
```
2020-12-02 08:49:40 +05:30
John Tzikas
3fdc6cb531 Fix misspellings and enable misspell on ci (#16285)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2020-12-01 16:27:05 +01:00
Eli Yukelzon
c2036f614e MM-30970 Add Basic unreadMentions support for collapsed threads (#16407)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-12-01 17:20:23 +02:00
Haardik Dharma
64499ca767 [MM-30912]: Change receiver name for (me *RenameProvider) in app/slashcommands/command_channel_rename.go to be more idiomatic. (#16388)
Automatic Merge
2020-12-01 15:45:18 +01:00
Haardik Dharma
a01927331a [MM-30909]: Change receiver name for (me *KickProvider) and (me *RemoveProvider)in app/slashcommands/command_remove.go to be more idiomatic. (#16385)
Automatic Merge
2020-12-01 06:15:17 +01:00
Haardik Dharma
e5df69df27 [MM-30908]: Change receiver name for (me *DndProvider) in app/slashcommands/command_dnd.go to be more idiomatic. (#16384)
Automatic Merge
2020-12-01 05:45:17 +01:00
Haardik Dharma
cbc66c9a37 [MM-30916]: Change receiver name for (me *LogoutProvider) in app/slashcommands/command_logout.go to be more idiomatic. (#16392)
Automatic Merge
2020-11-30 05:15:17 +01:00
Nick Misasi
9b6ee63a1e [MM-29845] Add CWS Webhook endpoint and payment failed email (#16351)
* Add a new handler to allow authentication via CWS API Key

* Make error better

* Add tests and cases for new handler functions

* Move some code around

* Add test for GetCloudSession function

* unset the env after test completion

* Remove white space

* Add CWS Webhook endpoint and email code

* handle returned errors from email sending function

* Change FailureCode to FailureMessage

* Remove unnecessary translations

* Fix translations

* Forgot to add template

* Update api4/cloud.go

Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>

* Update api4/cloud.go

Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>

* Update api4/cloud.go

Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>

* PR changes

* Update app/email.go

Co-authored-by: Mario de Frutos Dieguez <mario@defrutos.org>

* Close body in proper spot

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
Co-authored-by: Mario de Frutos Dieguez <mario@defrutos.org>
2020-11-25 15:45:15 -05:00
Scott Bishel
e014de0a65 MM-30802: Enable GoSAML2 library support (#16361)
* update saml to always use new library

* remove unused variable

* Update tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-11-25 08:14:56 -05:00
Eli Yukelzon
bcb861717e MM-30918 Fix product notice check when user setting is missing (#16396) 2020-11-25 09:30:44 +02:00
Haardik Dharma
5642d3106e [MM-30907]: Change receiver name for (me *AwayProvider) in app/slashcommands/command_away.go to be more idiomatic. (#16383)
Automatic Merge
2020-11-25 07:15:17 +01:00
Agniva De Sarker
64e98d535d MM-30862: Fix racy test RunComplianceReports (#16377)
We pass a copy of the compliance object to the goroutine

https://mattermost.atlassian.net/browse/MM-30862

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-11-24 21:36:34 +05:30
Deep Baldha
118b3be57c MM-30821: Change to idiomatic receiver names for slashcommands.msgProvider (#16346)
Automatic Merge
2020-11-24 16:45:17 +01:00
Deep Baldha
6e450ac82d MM-30816: Change to idiomatic receiver names for slashcommands.LoadTestProvider (#16341)
Automatic Merge
2020-11-24 15:45:17 +01:00
Deep Baldha
71d975e4bd MM-30820: Change to idiomatic receiver names for slashcommands.LeaveProvider (#16345)
Automatic Merge
2020-11-24 06:15:17 +01:00
Deep Baldha
819b4b8e7b MM-30825: Change to idiomatic receiver names for app.TestHelper (#16350)
Automatic Merge
2020-11-24 05:15:18 +01:00
Nick Misasi
3099128bbd [MM-29845] Add a new handler to allow authentication via CWS API Key (#16319)
* Add a new handler to allow authentication via CWS API Key

* Make error better

* Add tests and cases for new handler functions

* Move some code around

* Add test for GetCloudSession function

* unset the env after test completion

* Remove white space

* Change Info to Warn

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-11-23 14:34:10 -05:00
Deep Baldha
27462bbfc9 MM-30819: Change to idiomatic receiver names for slashcommands.PurposeProvider (#16344)
Automatic Merge
2020-11-23 19:45:17 +01:00
Deep Baldha
c4891bdb51 MM-30817: Change to idiomatic receiver names for slashcommands.OfflineProvider (#16342)
Automatic Merge
2020-11-23 15:45:17 +01:00
Agniva De Sarker
d9e8402dc2 MM-30319: Fix race in ensureAsymmetricSigningKey (#16354)
A cluster changed listener always runs in a separate goroutine.
This causes a race condition when a new member gets added in the cluster.

We fix it by accessing the value atomically.

I tried to write a test for this, but it wasn't triggering at all.
The best way is to just start the server with cluster enabled in race mode,
and verify that the race doesn't happen.

https://mattermost.atlassian.net/browse/MM-30319

```release-notes
NONE
```
2020-11-23 19:18:24 +05:30
OgmaJ
d28e7ec870 [MM-30136] Issuing /dnd consecutively should not toggle the user status between dnd and online (#16258)
Summary
/dnd will only do a do not disturb

Ticket Link
Fixes #16253
JIRA https://mattermost.atlassian.net/browse/MM-30136

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-11-23 15:06:43 +05:30
Jesús Espino
9ec09c2bcd Remove unneeded Err field in the store result struct (#16322)
* Remove unneeded Err field in the store result struct

* Fixing references to old errors in the tests
2020-11-23 09:26:01 +01:00