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

3144 Коммитов

Автор SHA1 Сообщение Дата
Harrison Healey
b316e1384e Change status code to 400 when attempting to enable Boards plugin with product enabled (#21521) 2022-10-26 18:15:19 -04:00
cyrilzhang-mm
82096a8cbb [MM-44336] Add timestamp parameter to test data slash commands (#21400) 2022-10-26 09:08:24 -04:00
Ibrahim Serdar Acikgoz
0fc1655cfc platform/service: fix a flaky test (#21497) 2022-10-26 08:42:10 +05:30
Harrison Healey
499f731a2b MM-46275/MM-46979 Production MPA for web app (#21401)
* MM-46275 Unify various targets for building web app

* MM-46275/MM-46979 Add logic to package boards product static files in CI

* Add error meessage when Boards files can't be found during packaging

* Remove a couple unneeded lines from release.mk

* Decrease size of machine used for setup-focalboard-product

* Revert "Add error meessage when Boards files can't be found during packaging"

This reverts commit f4f46ade0ac4c1ec5525d9b2eae959e13b9aec42.

* Revert "Revert "Add error meessage when Boards files can't be found during packaging""

This reverts commit a0e6420b19c5af0b5ff4706b6abaf8e56f8b3495.

* Fix unrelated email templates

* Skip flaky test
2022-10-25 17:02:14 -04:00
cyrilzhang-mm
a648ced221 [MM-42421] Prevent guests from seeing users through groups API (#21151) 2022-10-25 11:54:51 -04:00
Julian Mondragón
53b396d325 MM-46528_Verify Invitation Flow Tracking Telemetry - Fix build (#21488) 2022-10-24 19:29:01 -05:00
Julian Mondragón
757c4e041a MM-46528_Verify Invitation Flow Tracking Telemetry (#21227) 2022-10-24 16:20:56 -05:00
Scott Bishel
6ac0faf99e Display board statistics (#21433)
* prepackage boards v7.4.2

* allow plugin to call HasPermissionTo

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-10-21 18:10:45 +02:00
Ibrahim Serdar Acikgoz
2ce3e81490 move file backend to the platform service (#21365) 2022-10-21 12:24:36 +03:00
Julien Tant
b30e511ffe Deprecate ioutil (#21457) 2022-10-20 12:06:34 -07:00
cyrilzhang-mm
093c657e56 [MM-45052] Add error checking in insights API (#21048) 2022-10-20 14:37:24 -04:00
Harshil Sharma
31e6cdd0e6 Slack attachment in email notifications (#20946)
* First POC

* Added author data and markdown support

* WIP

* styled fields

* WIP

* WIP

* IMplementation done

* Updated template

* fixed mjml compilation error

* removed card.mjml

* Added test

* Updated a styling

* Updated a styling

* CI

* Updated generated templates

* Explicitelly specified font for message attachments

* Lint fix

* Removed leftover existances of slack attachment
2022-10-20 11:05:22 +05:30
Agniva De Sarker
5730d3da6e MM-47250: Add new system console section (#21333)
* MM-47250: Add new system console section

We add a new section in system console
for products.

```release-note
Added a new section in system console
for products. For now, it only contains
boards specific settings.
```

* fix unit tests

```release-note
NONE
```

* change comment

```release-note
NONE
```
2022-10-19 15:23:20 -04:00
Agniva De Sarker
3946c63970 MM-47612: Skip flaky test TestPluginAPIDeleteUserPreferences (#21425)
https://mattermost.atlassian.net/browse/MM-47612

```release-note
NONE
```
2022-10-18 19:37:40 +05:30
Muhammad Salman
a5f6e181ee Merge pull request #21045 from salmanmanekia/MM-44790
new ui for email verification due to change in the email address
2022-10-14 16:03:22 +03:00
Julien Tant
3747d99806 [MM-46694] A/B Test: welcome post (#20926)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-10-13 14:23:22 -07:00
Ibrahim Serdar Acikgoz
71d1b7df53 [MM-47468] Fix store metrics initialization (#21374)
* initialize metrics before store

* add tests

* reflect review comments
2022-10-12 16:31:16 +03:00
Agniva De Sarker
279c448da3 MM-36295: Do not convert thumbnails/previews to jpeg for png images (#21230)
We were applying a white background to transparent images
and converting them to jpegs. This was to make text be legible
behind a black preview background.

However, this has led to a poor user experience, as users rarely
download the full image but always click on previews. Therefore,
we need the previews to remain as pngs.

To fix this, we just re-encode them as pngs instead of jpgs.

```release-note
NONE
```
2022-10-11 19:04:09 +05:30
Muhammad Salman
542c36bd68 new ui for email verify change email address 2022-10-10 20:40:40 +03:00
Agniva De Sarker
9bf94bf6c1 MM-47249: Blocklist focalboard plugin in product mode (#21243)
We prevent the plugin from starting if in product mode,
and also give pretty errors to make it clear to the users.

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

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-10-08 10:21:22 +05:30
Ibrahim Serdar Acikgoz
e99eba33ff app/platform: move failover config initialization to platform (#21281) 2022-10-07 13:53:13 +03:00
Ibrahim Serdar Acikgoz
10655a2eb3 fix a data race in the platform service (#21242) 2022-10-06 14:14:03 +03:00
Ibrahim Serdar Acikgoz
5e69c6b02f Move cluster, webhub and store out of Server (#20899) 2022-10-06 11:04:21 +03:00
Azanul Haque
e599a6cbf3 Mm 46416 add default random message (#21176)
Automatic Merge
2022-10-04 12:52:09 +03:00
Michael Kochell
15b5b1c191 Avoid counting top channel posts for posts made by plugins and OAuth apps (#20943)
* add from_integration prop to oauth posts to:
- oauth app posts
- plugin posts
- slash command responses
- incoming webhook posts

* tests

* include check for bot posts

* use from_plugin and from_oauth_app props

* fix test

* avoid counting top channel posts for posts made by plugins and oauth apps
2022-09-30 04:12:15 -04:00
Vishal
f5f036d94b [MM-44489] Cloud limits: enforcing files (#20703)
* Update last accessible file time

* Filter fileInfos

* Set inaccessible header

* Fix lint issue

* Fix lint issue

* Fix i18n

* add nil check

* Fix merge conflicts

* Add helper functions to clear out inaccessible files content

* Remove content for inaccessible files

* Fix typo

* wip

* Remove InaccessibleContent field, instead use Archived

* Add store tests

* Add tests

* Add separate funcs to ignore cloud limits

* Use separate query for MySql

* Use GetReplicaX

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-09-28 12:52:53 -04:00
Vishal
44011db725 Add a semaphore (#21027) 2022-09-15 13:38:16 +05:30
Agniva De Sarker
c5d7ac0876 MM-46604: Fix racy access to session props (#20996)
The core mistake was that the webconn doesn't really go out of scope
once the connection disconnects. It is kept in the webhub connIndex
to be reconnected if the user connects again. This was the new
behavior as part of reliable websockets.

Therefore, it was a mistake to return the session to the pool
once the connection drops. Because the connection would still
recieve events from the web_hub.

And once you release the session, another login might acquire the
session and set some props, while the web_hub might still try
to send events to it, which will cause a read of the map prop.

The following test case illustrates such a race. It is very
hard to trigger it organically, hence I artificially wrote
the code.

The right fix is to release the session only when the connection
is stale and gets deleted from the conn index. The PR has been
load tested in `-race` mode just for extra sanity check.

```go
func TestHubSessionRace(t *testing.T) {
  th := Setup(t).InitBasic()
  defer th.TearDown()

  s := httptest.NewServer(dummyWebsocketHandler(t))
  defer s.Close()

  th.Server.HubStart()
  wc1 := registerDummyWebConn(t, th.App, s.Listener.Addr(), th.BasicUser.Id)
  defer wc1.Close()

  var wg sync.WaitGroup
  wg.Add(2)
  go func() {
    defer wg.Done()
    token := wc1.GetSessionToken()
    // Return to pool after *WebConn.Pump finishes
    wc1.App.Srv().userService.ReturnSessionToPool(wc1.GetSession())
    // A new HTTP requests acquires a session which gets it from the pool
    sess, _ := wc1.App.GetSession(token)
    // Login happens which sets some session properties
    sess.AddProp(model.SessionPropPlatform, "chrome")
  }()
  go func() {
    defer wg.Done()
    // Called from *WebConn.shouldSendEvent
    t.Log("session: ", wc1.GetSession().Props[model.SessionPropIsGuest] == "true")
  }()
  wg.Wait()
}
```

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

```release-note
NONE
```
2022-09-14 14:27:24 +05:30
Anurag Shivarathri
203c6a5013 Badge count fix for push notifications when CRT is enabled (#20898)
* Fix

* Fixed other cases and tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-09-12 14:51:33 +05:30
Shivashis Padhi
38aaa9e3d3 [MM-46603] P1 - Improvements in handling '0 posts' channels (#20905)
Automatic Merge
2022-09-09 20:34:00 +03:00
Doug Lauder
1d7822d154 Revert "Allow inline JSON in config.json for advanced logging config (#20954)" (#20983)
This reverts commit 5211d5de15.
2022-09-09 12:56:05 -04:00
Doug Lauder
5211d5de15 Allow inline JSON in config.json for advanced logging config (#20954)
* Allow embedded JSON in config.json for AdvancedLoggingConfig

* fix escaped JSON case

* Add unit test cases for escaped JSON

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-09-09 07:51:17 -04:00
Nick Misasi
8401a31c3a [MM-44729] Update payment failed email (#20925)
* Update Payment Failed Email

* Actually add the mjml file:

* Fix mjml indentation

* Fix pipelines

* Fix translations

* Fix translations

* Clean up translations

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-09-08 11:01:50 -04:00
kshitij katiyar
5a718f3c63 MM-29123: Removed the hard coded gitlab.com in Terms of Service error (#20830)
Automatic Merge
2022-09-08 13:04:00 +03:00
Julien Tant
d23c7ed2a3 [MM-46663] Only enable marketplace command completion when config allows it (#20919) 2022-09-06 08:43:34 -07:00
Allan Guwatudde
bd42f0cd8c [MM-45564] - Notify Admin v2 (#20777)
* [MM-45564] - Notify Admin v2

* add dummy data

* update dummy data

* add store methods

* experiment with recurring task

* complete saving of the notification

* make improvements

* make improvements

* add store layer tests

* fix lint

* update store layer tests

* add app layer unit tests

* add store layers

* add app layer tests

* fix lint

* fix lint

* fix tests

* fix tests lint

* fix lint

* fix lint

* fix retry layer test

* add notifications manual trigger

* filter notifications based on current plan

* add test case

* temp change

* feedback impl

* fix translations

* change job scheduler

* refactor job

* fix store layer tests

* extract i18n

* fix lint

* fix translations

* fix translations

* add license statement for new file

* feedback impl-2

* fix lint

* update make file

* add intl ids

* improve

* fix lint

* feedback impl

* move code and rename files

* fix lint

* feedback impl

* add config for trigger notifications api

* fix tests

* tmp change

* undo temp changes

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-09-02 13:52:48 +03:00
Kyriakos Z
c11ad8995f Adds OmitConnection parameter to broadcast (#20723)
* Adds OmitConnection parameter to broadcast

Currently we have no means to omit sending a websocket event to a
specific connection id.
This is needed mainly so that the initiator won't receive an event for
the action it just initiated.
Will be used for the global drafts feature, so that we won't update
drafts through ws when a user is typing.

This commit adds OmitConnection to the Broadcast struct and to the
NewWebSocketEvent function signature.
shouldSendEvent should return false for that specific connection.

* Return early only if connection id matches the omitted

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-09-02 13:17:22 +03:00
Agniva De Sarker
8f362cb8f6 Revert "Use error log level for websocket timeouts (#19609)" (#20929)
Apparently, this can happen in normal situations as well
and is causing confusion amongst customers. Reverting.

This reverts commit 9534efe534.

```release-note
NONE
```
2022-09-01 21:01:03 +05:30
Tim Scheuermann
aef5165cdc [MM-38705] Move import validators into own package (#20914) 2022-08-31 13:29:37 +02:00
Agniva De Sarker
c72e9131f4 MM-46577: Remove empty translation strings (#20876)
We replace the empty translation key with <untranslated>
which is ignored by the translation check tool.

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

```release-note
NONE
```
2022-08-25 19:59:16 +05:30
Nick Misasi
e8a45a8cf7 [MM-43399] Cloud Delinquency Email Sequence (#20814)
* Add DelinquentSince to Subscription fields

* Stashing, migrating

* Adding file

* Adding many email templates

* Fix templates pipeline

* Fix translations

* Fix mocks

* Many changes

* Adjust mocks

* Update i18n/en.json

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

* PR fixes

* Update string

* Update i18n/en.json

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

* Update URL's for buttons to open the delinquency modal

* Update emails from mjml

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
2022-08-25 09:39:35 -04:00
Shivashis Padhi
e3efc46f69 [MM-43444] Delete profile image and invalidate cache on permanent user deletion (#20033)
* Delete profile image and invalidate cache on permanent user deletion

* Modify request to send 202 with error information on failing to delete profile image
2022-08-25 11:30:50 +05:30
Shivashis Padhi
6adbcc5d05 MM-45899: Insights: least active channels (#20796)
* Add api endpoints, app layers for top inactive channels with dummy store calls

* Add store functions for top inactive channels

* Add model, store, app tests.

* Add client function and api tests

* Add participants information to TopInactiveChannel

* Translation fix

* Style fix while writing response

* Return channelmember IDs instead of profiles, query in batch avoiding inside the loop

* Make the following changes

 - move DeleteAt to subqueries, to avoid select, group by
 - Remove TeamId from response
 - Count bots and webhook posts

* SQL query lint fix, store test fix to include bot messages

* make app-layers

* Fix empty participant lists being sent as [""]

* Track channel joins, to distinguish 0 activity channels vs new channels

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-08-24 23:14:56 +05:30
Ibrahim Serdar Acikgoz
efbcb0a35a move logger under platform (#20831)
* move logger under platform
2022-08-24 10:10:56 +03:00
Doug Lauder
6a6e05073e Add preferences service API for products (#20869) 2022-08-23 11:57:07 -04:00
Julien Tant
3138543d10 [MM-46468] Change /help and add /marketplace (#20850) 2022-08-23 08:37:06 -07:00
Ibrahim Serdar Acikgoz
ddce3fa47b fix flaky busy test (#20861)
* fix flaky busy test

* increase busy duration
2022-08-23 11:42:04 +03:00
Shivashis Padhi
7643a28263 Merge pull request #20690 from plant99/MM-45118_my_top_dms
[MM-45118] Add insights endpoint for top dms
2022-08-19 19:33:44 +05:30
Ashish Bhate
ff4406e8b2 MM-46402: Use pointer to pointer to set pointer to nil (#20827)
Summary
We need a pointer to a pointer to set the original pointer to nil
The original task was not being set to nil (the local variable containing the pointer was being set to nil). The cancel function was being called even though the task had already been cancelled. This repeated cancellation was causing a panic because we were trying to close a channel that had already been closed the first time the task was cancelled.

Ticket Link
https://mattermost.atlassian.net/browse/MM-46402
2022-08-19 07:27:16 +05:30
Mattermod
e87a2bbe19 Merge branch 'master' into MM-45118_my_top_dms 2022-08-18 20:42:32 +03:00