Commit Graph

262 Commits

Author SHA1 Message Date
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
Maria A Nunez
4021098456 Removed onboarding feature flag (#23726) 2023-06-14 08:58:02 -04:00
Pablo Andrés Vélez Vidal
6a5bb53963 [MM-52969] Revert "MM-51482_Create Apps Category and link to bots DM (#22918)" (#23647)
* Revert "MM-51482_Create Apps Category and link to bots DM (#22918)"

This reverts commit 1051925eec.

* Revert "MM-51711_Feature flag: APPS sidebar category (#22766)"

This reverts commit 9156205178.
2023-06-14 11:05:21 +02:00
Scott Bishel
bc66807acc MM-53028 - Swap out todo plugin with snow in onboarding (#23681)
* swap out todo plugin with snow in onboarding

* Updating servicenow svg

* update name to be single word

---------

Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
2023-06-13 17:48:27 -06:00
Scott Bishel
6063f51b0f MM-53029 - Remove default (true) for channelExport and Apps plugin (#23682)
* remove default (true) for channelExport and Apps plugin

* readd constant, still used

* more cleanup of constants

* revert usage, constants changes

* update tests expecting Apps on by default

* remove defaults from tests

* revert package-lock.json

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-13 17:48:11 -06:00
Agniva De Sarker
c249ba4a66 MM-52532: Fix golangci warnings (#23709)
https://mattermost.atlassian.net/browse/MM-52532

- Replace golint with revive
- Add makezero linter
- Fix all the required linter failures

Some issues in enterprise and public modules
are yet to be fixed. We send this to expediate things.
2023-06-13 14:08:36 +05:30
Claudio Costa
62a3ee8adc [MM-52924] Implement ConfigurationWillBeSaved plugin hook (#23567)
* Implement ConfigurationWillBeSaved plugin hook

* Add comment

* Update comment

* Fix potential nil dereference if plugin environment is unset

* Address PR review
2023-06-12 18:23:02 -06:00
Scott Bishel
d0ad46b496 MM-52915 - Remove boards product config setting and system console (#23526)
* Remove boards product config setting and system console

* create config setting to enable/disable playbooks product

* fix to config name

* fix typo

* remove lingering ProductSettings references

* remove lingering ProductSettings references

* revert changes to package-lock.json

* Revert "revert changes to package-lock.json"

This reverts commit 1a7d98ace3.

* revert changes to package-lock.json

* fix build issues

* another fix

* update webap test

* i18n-extract

* Revert "i18n-extract"

This reverts commit c0a98c74ea.

* fix bad i18n-extract

* fix bad i18n-extract

* fix tests from bad merge

* more translation fixes

* more translation fixes

* updates from self-review

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-12 18:52:19 +02:00
Miguel de la Cruz
1215584665 Prevent boards product from being included automatically (#23539)
* Prevent boards product from being included automatically

* Fix config diff test

* Update prepackaged plugin version

Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>

* Readd boards/dist to the gitignore

* Does not enable the focalboard plugin by default

* Update plugin version to v7.10.3

---------

Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
2023-06-12 18:51:43 +02:00
Maria A Nunez
d8cb5f3a6e Update prepackaged version for NPS (#23699) 2023-06-12 12:30:10 -04:00
Nick Misasi
37196a6a26 Enforce PermissionSysconsoleWriteBilling in self serve workspace deletion (#23691) 2023-06-12 10:33:11 -04:00
mvitale1989
0445d8348c CLD-5698 - Add e2e smoketests (#23590)
* Prepare: run E2E smoketests with GitHub actions (#23301)
* Port E2E testing scripts from cypress-ui-automation
* Move server to docker-compose, move E2E images to ecrpublic
* Integrate General channel renaming, fixes
* Add local automation-dashboard
 Add readme
* Add E2E smoketests
* Bump postgres to 12
* Fully rely on mattermostdevelopment images

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>
Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
2023-06-12 11:56:33 +02:00
Ibrahim Serdar Acikgoz
4546a2eebb [MM-47976] cmd/mattermost/db: add downgrade commands and enable plan saving (#21779) 2023-06-12 12:48:50 +03:00
Agniva De Sarker
efaa6264cc MM-53032: Fix module path after repo rename (#23689)
It was a good decision in hindsight to keep the public module as 0.x
because this would have been a breaking change again.

https://mattermost.atlassian.net/browse/MM-53032
```release-note
Changed the Go module path from github.com/mattermost/mattermost-server/server/v8 to github.com/mattermost/mattermost/server/v8.

For the public facing module, it's path is also changed from github.com/mattermost/mattermost-server/server/public to github.com/mattermost/mattermost/server/public
```
2023-06-11 10:54:35 +05:30
Ibrahim Serdar Acikgoz
446b474489 [MM-49084] public/model/config: elasticsearch: add ingore option to some indexes to purge (#23571) 2023-06-10 00:50:08 +03:00
Jesse Hallam
8194817d54 disable coverage (#23686)
* 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
2023-06-09 12:29:08 +02:00
Julien Tant
cbfc14b2b4 [MM-52922] Fix a possible nil call to subscription.LastInvoice (#23540)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-08 11:41:40 -07:00
Ibrahim Serdar Acikgoz
a9645b634a server/Makefile: update morph usage in new-migration target (#23363) 2023-06-08 16:30:21 +03:00
Alejandro García Montoro
a195694896 Run the UPDATE only when needed (#23228) 2023-06-08 12:15:49 +02:00
Doug Lauder
ac3c0da8ff Support json.RawMessage in configuration env overrides (#23610)
* support json.RawMessage in env overrides
2023-06-07 17:21:58 -04:00
Jesse Hallam
305fac6507 Service environment (#23443)
* fix fileutils.TestFindFile on MacOS

* introduce model.ExternalServiceEnvironment

* pick license public key from external service env

* pick Stripe public key from external service env

* pick Rudder key from external service env

* configure Sentry DSN from external service env

* always log external_service_environment, Unsetenv

* clear faked BuildEnv, improve logging

* strip out unset GOTAGS

* fix Sentry tests

* simplify to just ServiceEnvironment

* relocate ServiceEnvironment in client config

* initialize CWS URLs based on service environment

* unset rudder key for boards dev

* harden service environment to avoid accidental production

* fix TestSentry again

* fix DEFAULT -> ENTERPRISE

* s/dev/test when naming playbooks rudder key

* simplify boards rudder key switch

* use uniform rudderKey variable names

* retain compatibility with existing pipeline

* reduce to just production/test

* unit test with valid test license

* simplify Playbooks telemetry initialization

* restore dev service environment

* emit ServiceEnvironment when running e2e tests
2023-06-07 10:15:33 -03:00
Ben Schumacher
6c82605df0 [MM-49989] Pass a context.Context to Client4 methods (#22922)
* Migrate all method in model/client4.go to accept a context.Context

* Fix th.*Client

* Fix remaining issues

* Empty commit to triger CI

* Fix test

* Add cancellation test

* Test that returned error is context.Canceled

* Fix bad merge

* Update mmctl code

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-06 23:29:29 +02:00
Doug Lauder
7116e9267a fix typo in index name for idx_teammembers_create_at (#23632) 2023-06-06 10:50:16 -04:00
Julien Tant
0468e772a9 [MM-52926] Deprecating work templates (#23466)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-05 18:42:03 -07:00
Scott Bishel
22275fa0f5 MM-52818 - create config setting to enable/disable playbooks product (#23508)
* create config setting to enable/disable playbooks product

* fix to config name

* fix typo

* revert changes to package-lock.json

* update name of test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-05 15:18:20 -06:00
Ben Schumacher
3705d7af4d Fix panic if JSON null value is passed as channel update (#23629) 2023-06-05 19:16:47 +02:00
KyeongSoo Kim
fbd6b5efe1 [MM-30432]: Allow users to specify different desktop notification sounds per channel (#21671) 2023-06-05 17:28:05 +05:30
Miguel de la Cruz
951456c780 Includes mmctl into the mono-repo (#23091)
* Includes mmctl into the mono-repo

* Update to use the new public module paths

* Adds docs check to the mmctl CI

* Fix public utils import path

* Tidy up modules

* Fix linter

* Update CI tasks to use the new file structure

* Update CI references
2023-06-05 12:42:55 +02:00
Harshil Sharma
412109b02e [MM-45802] Clear CRT notification on deleted reply (#23568)
* reduce the counter on post deletion

* add test

* change translations

* fix collecting mentions for DMs

* add translation texts

* extract logic for getting mentions

* send WS event

* add e2e tests

* tidy mod

* WIP

* Deleting notification async

* Fixed a unit test

* Added more tests

* Updated i18n

* CI

* mattermost-server -> mattermost

* mattermost-server -> mattermost

---------

Co-authored-by: Konstantinos Pittas <konstantinos.pittas@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-05 16:02:40 +05:30
Ben Schumacher
b6b561a8f1 [MM-52973] Avoid thundering herd problem in IsFirstUserAccount (#23549) 2023-06-05 10:32:23 +02:00
Ben Schumacher
9a55280d7a [MM-52955] Fix panic for not found posts (#23561) 2023-06-05 10:00:06 +02:00
Christopher Speller
3b0d0d7179 MM-52476 Fix guest users access to playbooks. (#23279)
* Fix guest users access to playbooks.

* Fix guest access.

* Add guests list restriction.
2023-06-02 06:56:23 -07:00
Konstantinos Pittas
4d41365fbe [MM-52541] Mark files as deleted along with thread (#23226)
* mark thread files as deleted

* add missing check

* improve query

* Stopped rendering post preview if post is deleted

* Fixed lint error

* Fixed test

* updated types

* Removed deleted post from other post's embed data

* Added tests

* Apply suggestions from code review

Co-authored-by: Daniel Espino García <larkox@gmail.com>

* lint fix

---------

Co-authored-by: Konstantinos Pittas <konstantinos.pittas@mattermost.com>
Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Harshil Sharma <18575143+harshilsharma63@users.noreply.github.com>
Co-authored-by: Daniel Espino García <larkox@gmail.com>
2023-06-02 16:00:33 +05:30
Doug Lauder
2efb574d3d Temporarily let AdvancedLoggingConfig take precedence over AdvancedLoggingJSON (#23578)
* Temporarily let AdvancedLoggingConfig take precedence over AdvancedLoggingJSON
2023-06-01 20:19:40 -04:00
Ibrahim Serdar Acikgoz
a1614da6f8 server/docker-compose.yml: updates to run HA in local after monorepo (#23552) 2023-06-01 09:58:43 +03:00
Ben Cooke
e74b73e8ee adding debug log when executing query (#23559) 2023-05-31 14:11:21 -04:00
mvitale1989
74beab5ad5 Revert "Prepare: run E2E smoketests with GitHub actions (#23301)" (#23553)
This reverts commit 68be3a6bcd.
2023-05-31 16:32:51 +02:00
Ben Schumacher
7a9a098ce4 Make used of typed atomic.Pointer (#23550) 2023-05-31 12:56:01 +02:00
Ben Cooke
427635a96f Avoid calling the user count query in future if we get a count > 0 (#23545)
* Avoid calling the user count query in future if we get a count > 0

* re-adding mock session to avoid adding the old mitigation in future

* adjustments based on feedback
2023-05-30 21:34:01 -04:00
mvitale1989
68be3a6bcd Prepare: run E2E smoketests with GitHub actions (#23301)
- Port E2E testing scripts from cypress-ui-automation
- Move server to docker-compose, move E2E images to ecrpublic
* Integrate General channel renaming, fixes
- Add local automation-dashboard
- Add readme
- Add E2E smoketests
- Bump postgres to 12

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>
Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
2023-05-30 17:34:15 +02:00
Agniva De Sarker
c7295b01e5 Enable golangci-lint (attempt 2) (#23517)
This time we are just using the Makefile command
to see if that makes a difference
```release-note
NONE
```
2023-05-30 15:16:42 +05:30
Vishal
fa1ba4717b [MM-52527] (#23519)
* limit markdown size
2023-05-29 19:02:22 +05:30
Jason Parker
77a1e6cae9 Change documented method from put to post (#23347)
Automatic Merge
2023-05-26 10:04:28 +03:00
M-ZubairAhmed
b72043727a [MM-52226] : Fix broken make-emojis command (#23454) 2023-05-26 10:43:44 +05:30
Ben Peachey
69196b2986 Fix typo in sqlstore migrations guide. (#23481)
Automatic Merge
2023-05-26 02:04:29 +03:00
Amy Blais
26977f28fb Update en.json (#23506)
Automatic Merge
2023-05-25 21:34:29 +03:00
Christopher Poile
d7cf652504 MM-52936 - Update prepackaged calls to v0.16.1 (#23504) 2023-05-25 13:10:28 -04:00