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

2167 Коммитов

Автор SHA1 Сообщение Дата
Ben Cooke
09e13360c2 Feature Flag for health of server dashboard (#19454)
* tools updates

* Revert "tools updates"

This reverts commit 6293297b55803c5a263e200ebd80192899666ae9.

* new feature flag for health of server dashboard

* fixing comment

* changing ff name

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.ht.home>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-03 13:28:22 -05:00
Agniva De Sarker
79d63193ac MM-41184: Remove /config/migrate API endpoint (#19418)
This was introduced to let the functionality happen
via mmctl, but it does not differentiate between
sysadmins vs people having physical access to machines.

Therefore, we remove it and only keep the local endpoint
accessible from mmctl --local.

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

```release-note
The api/v4/config/migrate API endpoint has been removed
in favor of the mmctl --local endpoint. API clients
won't be able to access this endpoint without having
physical access to the server.
```
2022-02-03 14:38:08 +05:30
Ben Schumacher
321b19e3db [MM-41290] Add Endpoint to complete onboarding (#19435) 2022-02-02 19:45:09 +01:00
Agniva De Sarker
a733fb840d GraphQL (part 1): Store layer (#19465)
We add the necessary store methods to use GraphQL

```release-note
NONE
```
2022-02-02 22:44:22 +05:30
Ben Cooke
e09345798e Growth spike: Get latest MM version (#19366)
* tools updates

* Revert "tools updates"

This reverts commit 6293297b55803c5a263e200ebd80192899666ae9.

* new endpoint to fetch the latest release information

* adding unit tests

* fixing tests and adding check for github response

* error translations

* fixing translations

* chaning error log

* changing cache size

* empty strings for translations

* changing size to 1

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-02 09:19:47 -05:00
Julien Tant
257ea22dac Merge pull request #19426 from JulienTant/MM-41189/remove-ff-invite-team 2022-02-01 09:18:27 -07:00
Ashish Bhate
ae16f51aea [MM-41351] Set ThreadAutoFollow to false by default (#19441)
Summary
ThreadAutoFollow is now false by default. Won't affect existing systems that have it set to true.

Ticket Link
https://mattermost.atlassian.net/browse/MM-41351
2022-02-01 16:21:04 +05:30
Julien Tant
0db5df4422 Merge pull request #19414 from JulienTant/MM-41188/remove-ff-plus-btn 2022-01-31 10:46:52 -07:00
Agniva De Sarker
6e97d581e4 PostStore: Remove db:"-" tag and some other hacks (#19384)
Before gorp, to use sqlx we had to resort to using
internal structs without the `db:"-"` tag so that
it doesn't interfere with the gorp table generation.

Now that it's gone, we can use the original model structs.

```release-note
NONE
```
2022-01-31 23:08:30 +05:30
Kyriakos Z
8f35243604 Fixes editing and pinning a post (#19425)
PR https://github.com/mattermost/mattermost-server/pull/19404 fixed the
replies on posts by casting StringArray to a string.

This PR fixes editing and pinning a post by casting StringArray, and
StringInterface to a string as well.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-01-27 14:47:41 +02:00
Julien Tant
fec826ade4 remove invite to team feature flag 2022-01-26 14:44:16 -07:00
Agniva De Sarker
54938694b2 MM-41209: Fix flaky test CreateRecurringTaskFromNextIntervalTime (#19416)
We were noting down the time of execution of a function and
expected that to match with the exact interval that we set.

However, sometimes in very busy CI environments, the goroutine
does not get a chance to be scheduled at the right time for
the interval to match exactly. Sometimes, we see a delay of
1 second.

To account for this, we increase the interval to 3 seconds,
and consider a 1 second buffer for this. If we see lags of
more than a second, then this test becomes useless and we
would need to remove it entirely.

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

```release-note
NONE
```
2022-01-26 15:28:40 +05:30
Kyriakos Z
513a4669cc MM-41066: fixes replies when binary_parameters=yes (#19404)
* MM-41066: fixes replies when binary_parameters=yes

Migrating post_store from gorp to sqlx breaks replies on threads.
Why? Participants is a jsonb field and when binary_parameters is set to
'yes' it is failing to insert because it needs the version (1) to be
prepended to the bytes array ([]byte{0x01}).

The easiest fix on this is to cast to a string when inserting.
There is a drawback though, non utf8 characters would be replaced by the
question mark icon �.

This commit does exactly that, casts StringArray to a string.

* Adds a comment

* Removes unnecessary conversion

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-01-26 11:36:33 +02:00
Julien Tant
a6b27a15cc remove FF plus button 2022-01-25 19:06:32 -07:00
Kirill Krotov
e2e049e05e [MM-39633] migrate team store to sqlx (#19207)
```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
2022-01-25 23:03:47 +05:30
Nathaniel Allred
3172adfce9 Mm 39663 (#19340)
* Add CurrentProductName to invoice
* make quantity a float
2022-01-24 15:43:42 -06:00
Lev
a0e870bed2 Restored ToJSON encoding (sans Integration) for Post APIs (#19279)
* Restored ToJSON encoding sans Integration for Post APIs

* PR feedback + GetPost test

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-01-21 08:25:33 -08:00
Scott Bishel
956e21cfa2 Boards data retention (#19262)
* add Boards to DataRetention, add hook for data retention

* remove replaces

* update hook to remove parameter

* add boards data retention to telemetry

* fix unit test

* update test, update hooks

* update RunDataRetention server version

* put behind a feature flag

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-01-20 17:46:03 -07:00
Josh Soref
294bd44971 [GH-19267] Spelling comments (#19268)
* spelling: comments

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-01-20 10:07:27 +05:30
Martin Kraft
c02c3f7f97 MM-40686: Added feature flag for group member dn lookup. (#19289)
* MM-40686: Added feature flag for group member dn lookup.

* MM-40686: Changes feature flag name.
2022-01-19 09:19:23 -05:00
Scott Bishel
5e147dd150 remove BoardsUnfurl feature flag (#19283) 2022-01-17 10:11:01 -07:00
Agniva De Sarker
b37c07ec41 Migrate channel_store to sqlx (#19247)
* Migrate channel_store to sqlx

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4/chur9rxkghprg7dz1mcqssj34ic

```release-note
NONE
```
2022-01-14 10:43:54 +05:30
Ibrahim Serdar Acikgoz
f829dba615 Update morph dependency (#19308)
* Update morph dependency to use a newer version

* remove timeout check for migrations statements

* store/sqlstore: reset timeout for mysql while creating db for migrations

* update morph to v0.2.1
2022-01-12 17:24:29 +03:00
Ashish Bhate
a55bd001b4 Revert "[MM-37013] Async job to fix CRT channel unreads (#18340)" (#19319)
This reverts commit 0da249c651.
2022-01-12 18:51:47 +05:30
Allan Guwatudde
664af506a3 [MM-39583] - Intermediary web login page: Workspace Cookies (#19256)
* [MM-39583] - Intermediary web login page: Workspace Cookies

* only cloud

* fix error with license check

* feedback impl

* improvement

* make improvements

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-01-12 10:31:46 +03:00
Nick Misasi
8ad9a22e77 Add a field to ConfirmPaymentMethodRequest type (#19301)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-01-11 09:49:29 -05:00
Ibrahim Serdar Acikgoz
240bfb2244 Fix a couple of issues related with morph feature branch (#19302)
* uncomment s3 uploads

* remove unnecessary check from config validation

* remove translation
2022-01-08 13:01:37 +03:00
Ibrahim Serdar Acikgoz
6595b31f23 Replace go-migrate with morph (#19116) 2022-01-08 10:16:07 +02:00
Agniva De Sarker
93a9c6c293 MM-40852: Fix make gen-serialized breakage (#19291)
- Fixed the Makefile command so that it can be run in CI
- Changed to go install to make it compatible with >1.16 versions.
- Removed unnecessary lines in go.tools.mod now that we aren't using that.

```release-note
NONE
```
2022-01-07 20:02:54 +05:30
Ibrahim Serdar Acikgoz
4ce7d993a4 Merge pull request #19263 from mattermost/MM-40778-migration
Remove AcceptedTermsOfServiceId from Users table
2022-01-03 22:16:46 +03:00
Agniva De Sarker
cfcdce9ae7 Migrate post_store to sqlx (#19241)
* Migrate post_store to sqlx

There are several queries which should improve further
if re-written with squirrel. HW tickets will be opened
for those.

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4/ctnryw9mga7fu9kc16xsap4phuw

```release-note
NONE
```

* Remove struct

```release-note
NONE
```

* fix tests

```release-note
NONE
```
2022-01-03 10:40:16 +05:30
Ibrahim Serdar Acikgoz
aa7eb64ff7 remove AcceptedTermsOfServiceId from users table 2021-12-30 18:32:24 +03:00
Michel Engelen
c198ef6e16 adding a feature flag for inline post editing (#19210) 2021-12-21 08:59:52 +01:00
Ben Schumacher
34c4e543f9 [MM-39999] Increase key length in plugin KV store to 150 (#19002) 2021-12-20 13:13:50 +01:00
Ben Schumacher
052d99c362 Remove dead struct ManifestExecutables (#19122) 2021-12-09 09:22:43 +01:00
Christopher Speller
5ec78546e2 MM-38150 Adding playbooks permissions (#19096)
* Add playbooks related permissions.

* Add RolesGrantPermission to pluginapi

* Fixing scopes.

* New defaults.

* Fix defaults

* Fix tests.

* Fix migration.

* More test and migration fixes.

* Need to add everything to system admin too.

* Move to 63

* Feedback fixes.

* Fix system manager editing playbook permissions.
2021-12-07 09:43:33 -08:00
Claudio Costa
6d361db638 [MM-40485] Enable receiving binary websocket messages (#19128)
* Enable receiving binary websocket messages

* Improve error message

* Prefer anonymous declaration

* Simplify

* Improve test

* Use MessagePack to clone WebSocketRequest struct

* Use short form

* Fix test
2021-12-07 15:24:18 +01:00
Kyriakos Z
36c8d1d1a0 MM-36862: removes participant from thread (#18795)
* MM-36862: removes participant from thread

Removing a participant upon last reply deleted from thread didn't work
reliably, a suspect on this is the replica lag, since we are first
deleting the post and then counting non-deleted posts of the participant
to decide on whether to delete or not.

The findings that led to this conclusion is that the reply count gets
updated but the participant is not removed (participant removal depends
on the number of replies this participant has in the thread.)

This commit fixes that by removing first the participant and then
deleting the post.
So we delete the participant if they have 1 post in that thread, and
then we delete the post, so now they have no posts in the thread.

* Makes deleting posts transactional

This commit makes deleting a post transactional and also tries to fix
permanent deletion of posts.

Currently when we permanently delete all posts by a user we don't update
the threads reply count nor the participant's array. This commit tries
to fix that.

* Adds comments on deleting posts

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-12-06 12:01:04 +02:00
Carrie Warner (Mattermost)
243a066554 Merge pull request #19043 from mattermost/tos-tou
Updated Terms of Service to Terms of Use
2021-12-03 10:19:29 -05:00
Agniva De Sarker
34db2e92cc Remove reliable websockets configuration (#19040)
The feature is stable enough to be removed
as a config knob.

For backwards compatiblity with older mobile
clients, we keep sending the config param
as true for client config requests.

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4/7m95frqbk9o8zxin6xo9c7iusoh

```release-note
NONE
```
2021-12-03 20:29:57 +05:30
Pablo Andrés Vélez Vidal
8a62bfaa65 MM-38674 - AB test for first guided channel creation (#18885)
* MM-38674 - AB test for first guided channel creation

* set default value for the guided creation as false

Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
2021-12-02 14:42:08 +01:00
Pablo Andrés Vélez Vidal
c96bb583e7 MM-40222 - show gov references in license page when gov license (#19100)
Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
2021-12-01 18:45:33 +01:00
Ben Cooke
27dacb82ce [MM-38239 & MM-39788] Recent files causing crash (#18942)
* wip

* adding tests for new endpoint

* tool updates

* new function for getting postsByIds

* fixing test

* adding limit of 1000 to post query

* fixing PR comments

* fixing permission logic

Co-authored-by: Collin <collineng@gmail.com>
Co-authored-by: Collin Eng <eng.engineereng@gmail.com>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.ht.home>
2021-11-26 11:51:32 -05:00
Carlos Tadeu Panato Junior
44d324a45f prepera db upgrade to 6.3 (#19086) 2021-11-26 16:51:25 +01:00
Carrie Warner (Mattermost)
d19204d584 Updated Terms of Service to Terms of Use 2021-11-24 08:48:01 -05:00
Claudio Costa
3dea98ea4b Implement deep copy method for model.WebSocketEvent (#18977) 2021-11-22 09:54:19 +01:00
Ashish Bhate
0da249c651 [MM-37013] Async job to fix CRT channel unreads (#18340)
Summary
The addition of the TotalMsgCountRoot and MsgCountRoot columns to support CRT caused several issues with previously read threads and channels being marked as unread. Previously we attempted to fix this purely in a SQL migration [MM-35345][MM-35494] fixes for incorrect mentions and unreads for threads and channels #17803 but that turned out to be too heavy and it was decided to break up some of the fixes into async jobs.
This PR implements an async job to mark channels as read if there are no user posts since the last time the user viewed the channel. 

Ticket Link
https://mattermost.atlassian.net/browse/MM-37013
2021-11-18 15:31:18 +05:30
Agniva De Sarker
b7a7d8e7b6 MM-39612: Make acquiring and removing connections atomic (#18982)
* MM-39612: Make acquiring and removing connections atomic

The reconnect phase of a websocket was split into two parts:
one where we check if a connection with a given connectionID
exists or not. And second, where we remove that connection
and insert the new connection again in the index.

This would lead to a race where it would be possible
for 2 concurrent requests for the same connectionID to go through
which would lead to separate goroutines working on the same dead queue.

We simplify this by removing the connection from the index
in the check connection stage itself. And then just add that
during register phase.

And to distinguish between a fresh and an old connection, we add
a new field called reuseCount.

While here, we also cleanup some old comments and add more
in some places.

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

```release-note
NONE
```

* remove unused method

```release-note
NONE
```

* race test

```release-note
NONE
```
2021-11-16 19:43:43 +05:30
Allan Guwatudde
0ee2a3ca35 [MM-39060] - A/B Test: Reminder to Join Workspace email (#18894)
* [MM-39060] - A/B Test: Reminder to Join Workspace email

* Fix error and add error handling

* feedback impl

* run make i18n-extract

* improvements

* make i18n-extract

* setup ability to do telemetry on reminder invite emails

* improvement

* add telemetry

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-11-15 18:42:15 +03:00
Allan Guwatudde
21a61813e8 [MM-39504] - Remove Prewritten Messages Feature Flag (#18968) 2021-11-15 09:35:10 +03:00