Commit Graph

308 Commits

Author SHA1 Message Date
Devin Binnie
abdf4e58c3 [MM-37984] Allow Desktop App to authenticate via external providers outside of the app on supported servers (#23795)
* WIP

* Add rate limiting for desktop token API

* Missing mocks

* Style fixes

* Update snapshots

* Maybe use an actual redirect link :P

* Refactoring for tests

* Add tests for server

* Fix lint issue

* Fix tests

* Fix lint

* Add front-end screen component

* Component logic

* Style changes

* Quick style fix

* Lint fixes

* Initial PR feedback

* Enable logging into the browser as well when completing the login process

* Refactor to push more logic to the other component

* Remove unnecessary helper code

* Fix i18n

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-07-12 09:25:05 -04:00
Scott Bishel
f45f774ece update for guest demotion and sysadmin edits (#23920)
* update for guest demotion and sysadmin edits

* update unit test

* update unit test

* use existing disabled flag

* remove commented line

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-07-11 16:10:44 -06:00
Devin Binnie
116728424c [MM-53124] Add optional Forgot Password custom link to override the default flow on the login page (#23831)
* [MM-53124] Add optional Forgot Password custom link to override the default flow on the login page

* Fix i18n

* Fix test

* Added the enable/disable flag

* Fix test

* Fix e2e

* Add blockable link for the Customization navigation
2023-07-11 09:04:39 -04:00
Scott Bishel
30140c0a27 MM-53098 Fix for checking bot and user permissions on shared endpoints (#23751)
* temp commit

* update test to allow bot creation

* add bot check to updateUser and deleteUser

* add more unit tests

* lint fixes

* lint fix

* update based on doc

* add more unit tests

* lint fixes

* fix unit tests

* fix unit tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-07-10 13:28:40 -06:00
Agniva De Sarker
da3d5c73fe MM-53406: Fix userstore.count to avoid antijoin (#23953)
For MySQL, a query for type LEFT JOIN .. IS NULL
leads to a nested antijoin which leads to poor performance.

We fix this by rewriting the query to avoid the antijoin.

See the JIRA epic for more context behind this.

We also make another improvement to remove the DISTINCT
clause. It didn't serve any purpose since userids would
already be unique.

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

```release-note
NONE
```
2023-07-10 10:19:44 +05:30
Agniva De Sarker
49e1d039f5 Reduce number of calls to IsCRTEnabled (#23963)
In a single createPost flow, there were
3 separate calls to App.IsCRTEnabled. This
showed up very slightly in the CPU profiles.

Not a big deal, but good to get it out of
the way.

```release-note
NONE
```
2023-07-10 10:18:55 +05:30
Christopher Poile
b5a3eee739 calls -> v0.17.0 (#23975) 2023-07-09 20:41:45 -06:00
Maria A Nunez
96d3e5864f Removed Post Priority feature flag (#23735)
* Removed post priority feature flag

* linting

* Update feature_flags.go
2023-07-07 11:42:57 -04:00
Jesse Hallam
dd4f71b2b6 add Apache 2.0 license to public submodule (#23945) 2023-07-07 10:56:42 -03:00
Maria A Nunez
5779bd49d5 Remove Global Drafts Feature Flag (#23767)
* Remove global draft feature flag

* More removal - in progress

* Removed the rest in webapp

* Removed the rest in webapp

* Fix tests

* Update feature_flags.go

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-07-05 12:18:30 -04:00
Ben Cooke
bf0e0ed45a [MM-53466] Remove concurrency from data retention delete batching (#23927)
* Add TimeBetweenBatches config value for data retention

* adding feature flag for data retention concurrency
---------

Co-authored-by: Julien Tant <julien@craftyx.fr>
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-07-05 11:09:03 -04:00
Agniva De Sarker
15eac83923 MM-52646: Fix data race on product notices (#23910)
The UpdateProductNotices method runs in a separate goroutine
which modifies a global structure called noticesCache.
This creates race condition when one test finishes
but the goroutine hasn't finished running.

To fix this, we simply prevent the spawning of the goroutine
by disabling the feature in the config.

Ideally, we'd not have global state in the first place.
But that's a separate matter.

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

```release-note
NONE
```
2023-07-05 20:36:14 +05:30
Agniva De Sarker
33565dc118 MM-52168: Bump dependencies (#23917)
https://mattermost.atlassian.net/browse/MM-52168

```release-note
NONE
```
2023-07-05 09:08:36 +05:30
Jesse Hallam
8abc8ed65c MM-53358: Revert Threads Everywhere (#23882)
Remove changes related to the unshipped threads everywhere feature, including commits b8da473da7 and 9f9e19e05d.

Since a version of Playbooks shipped calling this experimental API, keep a `nil` implementation to avoid breaking compatibility. We remove the hooks altogether, but keep the numbering again to avoid breaking compatbility.

Fixes: https://mattermost.atlassian.net/browse/MM-53358
2023-06-30 15:31:25 -03:00
Jesse Hallam
c506e01a97 server: automatically retry CI testing failures (#23820)
* server: --rerun-fails=3 for test-server(-race)?

* --rerun-fails=3 for IS_CI=true and -race as well
2023-06-30 15:00:37 -03:00
Agniva De Sarker
d9a28c1244 MM-52532: Fix golangci warnings for public module (#23918)
https://mattermost.atlassian.net/browse/MM-52532

```release-note
NONE
```
2023-06-30 20:12:56 +05:30
Scott Bishel
d74ee1a3da don't allow deletedAt to be set when creating user (#23914) 2023-06-30 10:10:10 -04:00
Daniel Espino García
fda5dd8468 Remove guest badge (#23825)
* Remove guest badge

* Address feedback

* Fix lint, test and i18n

* Fix test
2023-06-30 11:06:18 +02:00
Harshil Sharma
05cd245e97 Fixed a bug that prevent post deletion (#23908)
* Fixed a bug that prevent post deletion

* lint fix:
2023-06-30 10:29:27 +05:30
Agniva De Sarker
29466bd33a MM-53452: Skipping some flaky tests (#23911)
https://mattermost.atlassian.net/browse/MM-53452

```release-note
NONE
```
2023-06-29 22:23:46 +05:30
Jesse Hallam
53731f95ff Pre-package Playbooks v1.37.0 (#23880) 2023-06-29 10:49:48 -03:00
Miguel de la Cruz
4b1a37137d Disable skipping SendNotifyAdminPosts test (#23874) 2023-06-29 13:23:35 +02:00
Sinan Sonmez (Chaush)
385bf19972 Update testlibrary helper.go to reflect Monorepo (#23848) 2023-06-29 11:32:25 +03:00
Ben Schumacher
c6916c7047 Bump Apps plugin version to 1.2.2 (#23622) 2023-06-29 09:26:33 +02:00
Doug Lauder
9d6d8cceec Fix mismatched receiver name on method PostMetadata.Auditable (#23904) 2023-06-28 15:31:51 -04:00
Miguel de la Cruz
dcb9fb9f29 Set license for group mentions flaky test (#23873) 2023-06-28 10:51:32 +02:00
Maria A Nunez
4e92dde5b3 Remove Permalink Preview Feature Flag (#23731)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-27 17:42:55 -04:00
Scott Bishel
4e0c9eb163 Prepackage boards v7.11.0 (#23844) 2023-06-27 11:31:29 -06:00
Agniva De Sarker
71c5a8512c MM-51753: URL encode the file path in S3 uploads (#23849)
If the request is routed via bifrost, then we need to encode the path
to avoid signature validation errors.
This happens because in bifrost, we are signing the URL outside the SDK
and therefore the signature sent from the bifrost client
will contain the encoded path, whereas the original path is sent un-encoded.

More info at: a57c4d9278/aws/signer/v4/v4.go (L8)

https://mattermost.atlassian.net/browse/MM-51753
```release-note
NONE
```
2023-06-27 09:54:53 +05:30
Pablo Andrés Vélez Vidal
e8349545b8 MM-53087 - remove AB test for reduced onboarding task list item (#23856) 2023-06-26 21:41:25 +02:00
Ibrahim Serdar Acikgoz
8fe4c5376f update ES to 7.17.10 and enable ARM images through our own repository (#23851) 2023-06-26 21:00:48 +03:00
Pablo Andrés Vélez Vidal
887ba95cc1 MM-53088 - remove autoshow linked board (#23783)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-26 14:13:14 +02:00
Felipe Martin
cad2df1259 [MM-52943] fix: enable Elasticsearch properly on restart (#23806)
* fix: enable elasticsearch properly on restart

* use correct method under IsEnabled

* Empty-Commit to retrigger workflow

---------

Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-23 14:59:56 +02:00
Ben Schumacher
fe8d66bc98 [MM-53254] Fix make pluginapi (#23803) 2023-06-23 12:24:52 +02:00
Scott Bishel
644381b35e MM-53092 Fix for Updating SysAdmin user. (#23750)
* check retrieved user for role and permissions

* add unit tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-22 10:40:21 -06:00
mattermod
fcf7acdefa Update latest version to 7.10.3 2023-06-21 13:53:32 +00:00
Amy Blais
fcafa6211f Update version.go (#23811)
Automatic Merge
2023-06-21 15:17:28 +03:00
Matheus
d12812b6f3 add & to chars that must be treated as spaces (#23786)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-20 15:52:03 +02:00
Jesse Hallam
ef3a772836 Don't start grafana/prometheus by default (#23797)
Don't list Prometheus and Grafana as targets in the `start_dependencies` target of the docker compose file used in CI and local development. These can still be started by hand, but will no longer waste resources in CI, nor fail build spuriously if they fail to come online.
2023-06-19 14:01:47 -03:00
Felipe Martin
f3a9f166bb [MM-52869] Update and fix links in the system console (#23694)
* Updated privacy policy link

* Removed broken link from fa language

* Updated terms of use link

* Updated pricing links

* Updated self hosted billing links

* Updated terms-of-use links

* Updated privacy-policy links across the project

* Updated pricing links in e2e tests

* Updated cloud billing docs

* Fixed upgrading mattermost server links

* Updated ssl client certificate links

* Updated configure session lenghts links

* Updated configure site url links

* Updated elasticsearch links

* Update data retention policy links

* Updated ldap links

* advanced-permissions

* Updated anchor ServiceSettings.ListenAddress

* Updated anchor #SystemSettings.Forward80To443

* Updated link desktop managed resources

* Updated elasticsearch links

* Updated file content extraction links

* Updated HA Cluster inks

* Updated setup image proxy link

* Updated push notification links

* Update performance monitoring links

* Help links

* Updated about mattermost links

* updated report a problem links

* Updated download apps links

* Updated mobile apps links

* Update share messages links

* Updated format messages links

* Updated in product notices links

* Updated multi factor auth links

* Updated LDAP links

* Updated setup saml links

* Updated saml/ldap configuration links

* Updated plugins URL

* Updated plugin signing links

* Updated webhook links

* Updated slash commands links

* Updated oauth2 links

* Updated webhook links

* Update enable oauth2 links

* Updated personal access tokens list

* Updated experimental links

* Updated snap files

* check-style

* privacy/terms links in about modal
2023-06-19 18:46:52 +02:00
Ibrahim Serdar Acikgoz
0904be43f8 [MM-53195] services/telemetry: regen client config right after assigning diagnostic ID to platform (#23773) 2023-06-19 18:48:29 +03:00
Julien Tant
86f0877799 [MM-53086] Remove SendWelcomePost A/B test and feature (#23733)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-16 12:13:23 -07:00
Ibrahim Serdar Acikgoz
de61b9b687 [MM-53113] cmd/mattermost/db: remove app dependency from db reset command (#23727) 2023-06-16 15:36:41 +03:00
Jesse Hallam
2765d92991 Gotestsum (#22826)
* disable coverage

This reduces runtime of the server test suite from ~30m to ~10m, and as far as I can see: we discarded the coverage output anyway.

* allow morph 60s to migrate when running tests

* scripts/test.sh: drop COVERMODE

Stop generating coverage data when running unit tests. It's likely we'll want this data back at some point, but for now it's unused and removing simplifies invoking tests for developers.

* scripts/test.sh: remove cleanup steps

* scripts/test.sh: drop TESTS parameter

* scripts/test.sh: drop TESTFLAGS parameter

* switch to gotestsum
2023-06-15 15:27:52 -03:00
Michael Kochell
d403c034d4 [MM-48014] Auto-enable Apps Bar by moving EnableAppBar setting to DisableAppBar (#23010)
* auto-enable Apps Bar by moving EnableAppBar setting to DisableAppBar

* update playwright config

* remove EnableAppBar config setting to avoid confusion

* small fixes

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
2023-06-15 12:33:06 -04:00
Agniva De Sarker
747b4cf26c MM-53058: Move cache layer out of timer layer (#23660)
Having cache layer as part of the store call
Prometheus metrics can be somewhat misleading
because cache-backed methods can have very high
volume and yet not cause any load on the DB at all.

However, if the admin is not aware which calls
are cache-backed and which are not, then
it can be hard to understand why a store call
of high volume isn't causing any stress on the DB at all.

Therefore, for simplicity we reorder the layers
such that cache layer is handled outside the timer layer.

We already have cache related metrics like hit/miss
which can be used to monitor cache usage.

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

```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-15 21:08:14 +05:30
Doug Lauder
d655ab94a3 Sanitize post for audit with preview links (#23745)
* sanitize post for audit with preview links

* add unit test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-15 08:23:56 -04:00
mvitale1989
b8858c4582 CLD-5835 - Do not use the mattermost-build-webapp image from ECR (#23748)
* Only use mattermostdevelopment images
* Fix docker mirroring workflow
* Reenable insights feature for E2E tests
2023-06-15 08:43:39 +02:00
Miguel de la Cruz
44a99d1736 Move playbooks to plugin (#23732)
* Remove build references

* Remove playbooks webapp and server, and add the prepackaged plugin

* Remove translations

* Add ProductSettings to the playwright type

* Restore playbooks as a prepackaged plugin for cypress e2e tests
2023-06-14 23:33:26 +02:00
Harshil Sharma
79abeb6382 [MM-53026] - Disabled insights by default (#23702)
* Insights disabled by default

* fixed tests

* fixed tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-14 19:40:12 +05:30