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

2284 Коммитов

Автор SHA1 Сообщение Дата
Jason Blais
3aa4e4488b MM-45055 Change "Enable Authentication Transfer" to be (#20453)
Automatic Merge
2022-06-17 22:30:18 +03:00
Nathaniel Allred
d43c06ea75 remove freemium feature flag (#20491) 2022-06-17 11:13:22 -05:00
Riccardo Santoni
dd7067cbe9 [MM-44434] Introduced search for channel id's through system console. (#20259)
* Introduced search for channel id's

* Small fix to test case as it is not looking at count

* Introduced searching channels by id as a ChannelOpt. Defaulting to true for system console for the time being

* go fmt

* Modified whether to include search by id by passing it in as prop to search endpoint. Modified webapp to pass through search by id as well

* Fixed issue with full text search, as there is not always necessarily an index on Id.

* Modified test to verify count, and moved code inside conditional

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-16 11:32:16 -04:00
Tim Scheuermann
eb034fc981 MM-44236 Update server dependencies (#20444) 2022-06-16 08:50:55 +02:00
Mattermod
906fab07bd Update minor version to 7.1.0 (#20465)
Co-authored-by: Mmbot <mmbot@mattermost>
2022-06-14 17:41:50 +03:00
Agniva De Sarker
680b00047f MM-45000: Change dyatlov dependency (#20443)
* MM-45000: Change dyatlov dependency

https://mattermost.atlassian.net/browse/MM-45000
2022-06-14 16:11:53 +03:00
Martin Kraft
182ae1234a MM-43956: Adds post counts by duration. (#20131)
* MM-43956: Adds post counts by day.

* MM-43956: Test data cleanup. Switch from Unix to UnixMilli.

* MM-43956: Changes from selecting date data types to strings in SQL.

* MM-43956: Fixes date format key.

* MM-43956: Adds missing user id scope for 'my' top channels graph.

* MM-43956: Adds the ability to group post counts by hour.

* MM-43956: Require enterprise or professional license. Reject guests.

* MM-43956: Adds license for tests.

* MM-43956: Renames function.

* MM-43956: Omits future hours from post counts by hour.

* MM-43956: Adjust API response grouping to users timezone.

* MM-43956: Adds translation.

* MM-43956: Adds user's timezone to the data tier for the grouping by day and hour.

* MM-43956: Fixes layers.

* MM-43956: Lint fix.

* MM-43956: Fix store layers.

* MM-43956: Switches to default name for time package; changes parameter names to avoid naming conflict.

* MM-43956: Updates mocks.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-13 16:22:34 -04:00
Agniva De Sarker
7c1b8cd937 MM-43733: Set concurrency limits via configuration (#20413)
```release-note
We create a new config option MaxImageDecoderConcurrency which
indicates how many images can be decoded concurrently at once.

The default is -1 which means number of CPUs present.

This affects the total memory consumption of the server. The
maximum memory of a single image is dictated by MaxImageResolution * 24 bytes.
Therefore, a good rule of thumb to follow is that MaxImageResolution
* MaxImageDecoderConcurrency * 24 should be less then the allocated memory for
image decoding.
```

https://mattermost.atlassian.net/browse/MM-43733
2022-06-11 00:24:46 +05:30
Agniva De Sarker
16174cacf0 Fix client driver API for UpdateUserCustomStatus (#20433)
UpdateUserCustomStatus server API never returned the object.
But the client driver tried to parse the JSON response into
a struct, which always parsed as an empty struct.

We fix that by returning the original response and added
a comment to clarify that.

Found while adding coverage for custom status in the load-test
tool.

```release-note
NONE
```
2022-06-10 20:06:59 +05:30
darkLord19
a251510717 remove unused code around unimplemented ExperimentalSettings.EnableClickToReply setting (#20389) 2022-06-08 15:40:30 -04:00
Ben Cooke
2c63e8dd08 [MM-43785] Hide insights feature intro for new users (#20214)
* tools updates

* Revert "tools updates"

This reverts commit 6293297b55803c5a263e200ebd80192899666ae9.

* hide insights modal by default for new users

* updating feature flag for test

* updating preference tests

* fixing lint

* fixing comment

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-06-08 14:56:34 -04:00
Ibrahim Serdar Acikgoz
c986693e4a Revert "config/diff: add utility function to get diffs scoped with struct tags (#20297)" (#20391)
This reverts commit a18934b042.
2022-06-08 17:28:35 +03:00
Tim Scheuermann
ef3f1b5796 [MM-44925] simplified the ID generator (#20398) 2022-06-08 16:12:02 +02:00
Ashish Dhama
485f44c136 Set Advanced Text Editor feature flag default value to True (#20357)
Automatic Merge
2022-06-08 15:36:28 +03:00
Maria A Nunez
ab02903f8c Loosen password req defaults (#20372)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-07 16:48:47 -04:00
Claudio Costa
159ebc297d Pre-package Calls v0.6.0 and enable it by default (#20388)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-07 19:45:43 +02:00
Vishal
27fc14201f [MM-42192] Include deleted posts in GetPost (#20358)
* Introduced include_deleted query param on get posts endpoint

* Update the correct func name in the comment.

Co-authored-by: santoniriccardo <santoni.riccardo@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-06 13:29:42 +05:30
Ashish Bhate
8f912b697e MM-43918: freemium limit for storage (#20225)
Summary
Adds an API end point to return storage usage

Ticket Link
https://mattermost.atlassian.net/browse/MM-43918
2022-06-03 11:48:29 +05:30
Pablo Andrés Vélez Vidal
d5333603ab MM 43666 - request bussiness email (#20315)
* MM-43666 - request bussiness email

* add the newValidEmail information

* revert ff model changes

* remove unnecessary pointer and fix test spelling

* fix unit tests and add a new one for when passing a valid email

* fix go lint

Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-01 23:36:03 +02:00
Nick Misasi
cffe921e62 [MM-44475] Team Unarchive: Do not allow to unarchive if workspace has reached the limit of teams (#20281)
* Prevent cloud limited installations from restoring teams when at or above the teams limit

* Code clean up

* fix i18n

* Actually fix i18n

* updates for govet

* Update model/client4.go

Co-authored-by: Vishal <vish9812@gmail.com>

* [MM-44397] Restrict team creation based on subscription limits (#20282)

* restrict team creation based on limits

* Update api4/team.go

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

* Fix tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>

* Add additional field to teamsusage

* Fix

* remove useless test

* Fix error for team creation

* Remove apostrophe

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Vishal <vish9812@gmail.com>
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
2022-05-31 15:06:54 -04:00
Ibrahim Serdar Acikgoz
a18934b042 config/diff: add utility function to get diffs scoped with struct tags (#20297)
* config/diff: add utility function to get diffs scoped with struct tags

* api4/config.go: check cloud accessible settings after merge
2022-05-31 17:10:32 +03:00
Vishal
d87fe35bdf [MM-44263] Cache Posts Usage (#20254)
* Fetch users only posts

* Cache Posts Usage

* Explicitly validate posts count before testing usage

* Add DocString

* Revert cache changes

* Revert "Revert cache changes"

This reverts commit ba693f8d5028b62c19f6a730e8dca73a224d0761.
2022-05-31 16:25:46 +05:30
Vishal
57e9aa767c [MM-44263] Only include user posts in post count (#20250)
* Fetch users only posts

* Explicitly validate posts count before testing usage
2022-05-31 14:18:41 +05:30
Alejandro García Montoro
b10ff1b1f7 MM-44221: Add admin console setting to enable/disable App Bar (#20224)
* Revert "[MM-39820] Add AppBarEnabled feature flag (#18967)"

This reverts commit ba1b279c5f.

* Add EnableAppBar admin setting

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-25 22:53:51 +02:00
Michael Kochell
ea5bfe3fd9 Cloud Freemium - Integrations (#20185)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-25 12:36:08 -04:00
Nick Misasi
50d069e86d [MM-44307] On Limits Change, archive or restore teams according to the limits (#20247)
Automatic Merge
2022-05-24 16:16:24 +03:00
Harshil Sharma
b13d5e7466 Added Archived column to FileInfo (#20164)
* Added Archived column to FileInfo

* fixed typo

* Added new column to store column list

* Fixing tests

* Updated migration number to syncup with master
2022-05-23 12:15:56 +05:30
Miguel de la Cruz
c100fc2135 Revert "config/diff: add utility function to get diffs scoped with struct tags (#20206)" (#20256)
Automatic Merge
2022-05-21 00:16:24 +03:00
Kyriakos Z
9a67ae9ac6 MM-38982: fixes SVG uploading (#20141)
* MM-38982: fixes SVG uploading

Uploading SVG files was "almost" treated like an image in some places,
resulting in not showing the SVG on the client.
This is happening because when we fail to generate a mini preview for an
image, we prepend "invalid-" to the MimeType.

This commit adds a check to guard against SVG files in methods that make
no sense for SVGs.

* Reverts invalid-{mimetype} fix

* Uses fileInfo.IsSvg() where it can
2022-05-20 10:26:21 -04:00
Vishal
2a9f78536f [MM-43798] Change default CRT option from Disabled to AlwaysOn (#20114)
* MM-32692 Add two more CRT options

* [MM-43798] Change CRT default to AlwaysOn

* Rename variable

* fix test

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Ashish Bhate <ashish.bhate@mattermost.com>
2022-05-18 18:53:41 +02:00
Pablo Andrés Vélez Vidal
f08d65909f MM-43529 - start freemium trial (#20163)
* MM-43529 - start freemium trial

* change the method to put

* Add unit testing for the request-trial-endpoint

* use correct require

* add the translation texts

* fix texts

* remove unnecessary log

* change response status code to forbidden when non cloud

Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
2022-05-18 10:19:38 +02:00
Agniva De Sarker
617007a56d MM-42379: Do not set TrustedProxyIPHeader for new instances (#20217)
We move away with the update logic and just set an empty
slice always.

```release-note
The value of ServiceSettings.TrustedProxyIPHeader will default
to empty from now on. A previous bug prevented this from happening
in certain conditions. Customers are requested to check for these
values in their config and set them to nil if necessary.
```
2022-05-18 13:02:55 +05:30
Vishal
fd703a365b [MM-43917] Cloud Freemium limits API: messages/posts (#20152)
* WIP - Add api and app funcs

* Add test cases

* Add utils testcases

* Exclude deleted posts

* Add doc for func

* Move api from cloud to usage

* Allow api access to authenticated users

* Change int to int64

* Fix lint issue

* Simplify err check

Co-authored-by: Ashish Bhate <ashish.bhate@mattermost.com>

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Ashish Bhate <ashish.bhate@mattermost.com>
2022-05-17 13:30:40 +02:00
Ibrahim Serdar Acikgoz
8802c6c9d6 config/diff: add utility function to get diffs scoped with struct tags (#20206) 2022-05-16 15:12:12 +03:00
Agniva De Sarker
aa59c28b04 POC: Cross-team recent search (#20027)
Just a quick POC to move fast :P

We use a search pointer to keep track of
the next row to inesrt to. For every new search
we increment the pointer and do modulo 5.
This means that the value will always remain
between 0-4. And that way, we will always overwrite
the oldest entry on every search.

And while getting the results, we get
all results for that user.

The search parameters are json marshalled
and stored as a JSON blob. This is because
there is no need to search/filter them
in the DB.

Pending items:
Tests obviously.

To improve:
The client needs to send the channel ids
instead of channel names.
2022-05-16 13:16:11 +05:30
Mattermod
979b616189 Update minor version to 7.0 (#20199)
Automatic Merge
2022-05-13 16:09:55 +03:00
Ashish Dhama
87a719b4b4 [MM-44123] Advanced Text Editor Feature Flag (#20184)
* Advance Text Editor Feature Flag

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-12 16:28:09 +05:30
Vishal
1092c60bc6 [MM-32692] Add two more CRT options (#20088)
* MM-32692 Add two more CRT options deafult_on and always_on

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-12 12:03:59 +05:30
Claudio Costa
aee68c7ae4 [MM-44056] Make Calls plugin's state on Cloud controllable by feature flag (#20161)
* Make Calls plugin's state on Cloud controllable by feature flag

* Prepackage Calls v0.4.9 (#20148)

* Update app/plugin.go

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>

* Update app/plugin_install.go

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>

* Bump Calls version to latest

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-10 19:29:48 +02:00
Nathaniel Allred
6f87eb67fc MM-43084 update product limits through webhook and websocket (#20076)
* Define interfaces for updating subscriptions and product limits from CWS webhook.
2022-05-09 08:05:50 -05:00
Martin Kraft
cd487c812c MM-41211: Allows rollback without destroying previous config setting. (#20137)
* MM-41211: Allows rollback without destroying previous config setting.

* MM-41211: Revert to original logic for unused config settings.

* MM-41211: Moves days defaults before hours defaults.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-05 10:41:18 -04:00
Agniva De Sarker
89fac9d485 MM-41153: Add seats deployed to support packet (#20125)
Support packet contains 2 new fields:
1. Active users.
2. License supported users.

We refactor the code to its separate file.

```release-note
NONE
```
2022-05-03 21:13:16 +05:30
Jesse Hallam
72a5d99ae3 MM-43770: Rename to Threads.ThreadDeleteAt (#20074)
Old versions of the Mattermost server did not qualify queries scanning both `Posts` and `Threads`, and choke on the ambiguity in deciding between the new `DeleteAt` on `Threads` and the `DeleteAt` on `Posts` in existing queries.

While this problem is transient only while running multiple server versions, it effectively makes our backwards compatibility guarantee void, not to mention complicating cloud deployments.

Work around this by renaming `Threads.DeleteAt` to `Threads.ThreadDeleteAt`. The old migration is nulled out, but remains, since some test servers have already upgraded and manually fixing each affected instance would be problematic. Thew new migration takes care of removing the old column -- if it ever existed.

Fixes: https://mattermost.atlassian.net/browse/MM-43770

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-04-29 14:42:38 -03:00
Martin Kraft
cb3d8f0a1c MM-41211: Replaces SessionLength*InDays with SessionLength*InHours. (#19838)
* MM-41211: Replaces SessionLength[Web|Mobile|SSO]InDays with SessionLength[Web|Mobile|SSO]InHours.

* MM-41211: Clear the value of the old config settings.
2022-04-28 17:31:35 -04:00
Nick Misasi
373c4655e6 [MM-43337] Updating email templates for trial will end and trial ended emails (#19976)
* Updating email templates for trial will end and trial will end emails

* put back variable

* Rebuilding

* fix tests

* Updates

* [MM-43339] Add Cloud Subscription Upgrade Confirmation Email (#19989)

* Add Cloud Upgrade Confirmation email

* Updates

* String change

* i18n-extract

* Updates

* make email-mocks

* Appease linter

* Add a test

* GMAIL NEVER RENDERS RIGHT

* Important EVERYWHERE because gmail just cant deal

* l

* Last one

* Update image

* Update tests

* Fix tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-04-28 10:06:16 -04:00
Mylon Suren
52ac449012 [MM-42739] Insights - Top Channels API Endpoint (#19953)
* [MM-42739] Initial setup for top channels for team

* [MM-42739] Add initial tests

* [MM-42739] Update tests

* [MM-42739] Add top channels for user

* [MM-42739] Fix query

* [MM-42739] Update query

* [MM-42739] Improve query performance

* [MM-42739] Remove rank

* [MM-42739] Fix tests to use new time range today

* [MM-42739] Add tests for top channels for user

* [MM-42739] Add test for pagination

* Remove top channels by time struct

* [MM-42739] Update test names

* [MM-42739] Remove rank from top reactions

* [MM-42739] Return empty array instead of nil when result is empty

* [MM-42739] Add additional tests and update permissions check for teams

* [MM-42739] Add excluded channel tests for top reactions

* [MM-42739] Move insights to api4/insights and keep time range as string until required

* [MM-42739] Update queries only check DeleteAt after union

* [MM-42739] Improve query performance by using publicchannels table

* [MM-42739] Fix broken query after merge
2022-04-26 14:42:24 -04:00
Nathaniel Allred
d4db43c95e Mm 43084 add cloud workspace limits endpoint (#20041)
* add cloud workspace limits endpoint
2022-04-22 14:23:19 -05:00
Claudio Costa
92c5c256ef Allow per connection WebSocket broadcasts (#19993) 2022-04-22 15:53:42 +02:00
Jesse Hallam
5bd223c836 MM-43045: minimize JOIN Posts (#19934) 2022-04-19 17:06:31 -03:00
Agniva De Sarker
c78c5ce3f3 Add feature flag for command palette (#20011)
```release-note
NONE
```
2022-04-18 14:43:47 +05:30