Commit graph

1194 commits

Author SHA1 Message Date
Miguel de la Cruz
809ad4f76d
Adds Remote Cluster related API endpoints (#27432)
* Adds Remote Cluster related API endpoints

New endpoints for the following routes are added:

- Get Remote Clusters at `GET /api/v4/remotecluster`
- Create Remote Cluster at `POST /api/v4/remotecluster`
- Accept Remote Cluster invite at `POST
/api/v4/remotecluster/accept_invite`
- Generate Remote Cluster invite at `POST
/api/v4/remotecluster/{remote_id}/generate_invite`
- Get Remote Cluster at `GET /api/v4/remotecluster/{remote_id}`
- Patch Remote Cluster at `PATCH /api/v4/remotecluster/{remote_id}`
- Delete Remote Cluster at `DELETE /api/v4/remotecluster/{remote_id}`

These endpoints are planned to be used from the system console, and
gated through the `manage_secure_connections` permission.

* Update server/channels/api4/remote_cluster_test.go

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>

* Fix AppError names

---------

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
Co-authored-by: Mattermost Build <build@mattermost.com>
2024-07-04 10:35:26 +02:00
Christopher Poile
cc5e87ae24
[MM-57942] Fix a panic on password is too long (#27449)
* return error from bcrypt, handle gracefully; remove dead code

* linting

* linting

* i18n

* fix test

* fill out translations
2024-07-03 17:58:26 -04:00
Scott Bishel
0dbef88cfc
MM-58771 - Make manage_server permission, non updatable (#27481)
* make manage_server, non updatable

* remove blank line
2024-07-03 12:41:20 -06:00
Weblate (bot)
35dda81e32
Translations update from Mattermost Weblate (#27507)
* Translated using Weblate (German)

Currently translated at 100.0% (2510 of 2510 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/de/

* Translated using Weblate (German)

Currently translated at 100.0% (5775 of 5775 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/de/

* Translated using Weblate (Polish)

Currently translated at 100.0% (2510 of 2510 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/pl/

* Translated using Weblate (Polish)

Currently translated at 100.0% (5775 of 5775 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/pl/

* Translated using Weblate (Dutch)

Currently translated at 99.9% (5771 of 5775 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nl/

* Translated using Weblate (Serbian)

Currently translated at 10.5% (611 of 5775 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/sr/

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 6.3% (369 of 5775 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/

* Translated using Weblate (German)

Currently translated at 100.0% (5801 of 5801 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/de/

---------

Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: homerCOD <anicin.goran@gmail.com>
Co-authored-by: Frank Paul Silye <frankps@uio.no>
2024-07-03 15:26:35 -03:00
Caleb Roseland
90534b13cf
MM-56774: Delete file along with bookmark (#27495) 2024-07-03 08:31:39 -05:00
Akis Maziotis
762ff9b96c
[chore] migration of plugin-store (#27506)
Plugin store is gradually migrated from:
- https://plugins-store.test.mattermost.com
to
- https://plugins.releases.mattermost.com

We reflect that change here

Note: Currently both CDN's are working as expected, to facilitate the mgiration. Upon succesfull migration, https://plugins-store.test.mattermost.com will be decomissioned
2024-07-03 08:23:43 +03:00
Ben Cooke
1f9c9486b8
fix panic in migrations (#27494) 2024-07-02 09:08:23 -04:00
unified-ci-app[bot]
8dcd839766
Update latest minor version to 9.11.0 (#27496)
Automatic Merge
2024-07-02 15:57:50 +03:00
Ben Schumacher
213ebc57fb
Print panic message when mmctl panics (#27390) 2024-07-02 13:58:37 +02:00
Scott Bishel
b78175c390
require Permission to user to mark channels as read (#27468) 2024-07-02 13:35:43 +02:00
Agniva De Sarker
d20b55bde8
MM-57375: Update to latest minio image (#27475)
* test with latest minio image
* Update the KMS key
- Also use latest config settings. The older ones were deprecated.
2024-06-28 20:34:18 +05:30
Ibrahim Serdar Acikgoz
e85d34163c
Add support packet metadata (#27465) 2024-06-27 15:27:57 +02:00
Scott Bishel
817e18414e
require regenerate invite id to have invite permission (#27427) 2024-06-26 12:41:26 -06:00
Miguel de la Cruz
2aff84a72e
Sanitize RemoteEmail user prop (#27170)
* Sanitize RemoteEmail user prop

If the server is configured to hide user emails, the "RemoteEmail"
user property will be sanitized as well, effectively hiding the real
email of remote users.

* fix merge conflict

---------

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
Co-authored-by: Mattermost Build <build@mattermost.com>
2024-06-26 13:48:31 -04:00
Scott Bishel
6fd894953c
update for adding multiple members (#25128)
* update for adding multiple members

* fix unit test

* more test fixes

* add another unit test

* fix object passed by client4

* revert package-lock.json

* revert package-lock.json

* add length check

* limit size of lists in API requests

* revert package-lock

* add batching to front end

* add batching to front end

* fix bad merge

* update return type

* remove unnecessary permisssion check, add unit test

* fixes and add tests from review

* revert changes adding limits to other apis

* fixes

* clean-up from code review

* fix unit test call

* revert back to interface{}, fix unit test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-06-25 12:25:28 -06:00
Doug Lauder
6773d13dee
MM-58255 Ensure remote users do not get valid email addresses (#27421)
* remote users don't get valid email addresses; remote users cannot have access tokens

* block notification emails for remote users

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-06-25 09:26:08 -04:00
Frank Paul Silye
e32bfafb90 Translated using Weblate (Norwegian Bokmål)
Currently translated at 0.9% (24 of 2509 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/nb_NO/
2024-06-24 23:02:23 +03:00
ThrRip
c270e8630a Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (2507 of 2509 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/zh_Hans/
2024-06-24 23:02:23 +03:00
Tom De Moor
0ff938167b Translated using Weblate (Dutch)
Currently translated at 100.0% (2509 of 2509 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/nl/
2024-06-24 23:02:23 +03:00
Matthew Williams
371d1b0f97 Translated using Weblate (English (Australia))
Currently translated at 100.0% (2509 of 2509 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/en_AU/
2024-06-24 23:02:23 +03:00
master7
71f82bf0db Translated using Weblate (Polish)
Currently translated at 100.0% (2509 of 2509 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/pl/
2024-06-24 23:02:23 +03:00
MArtin Johnson
935c2863df Translated using Weblate (Swedish)
Currently translated at 100.0% (2509 of 2509 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/sv/
2024-06-24 23:02:23 +03:00
Konstantin
a0c45657c7 Translated using Weblate (Russian)
Currently translated at 100.0% (2509 of 2509 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/ru/
2024-06-24 23:02:23 +03:00
jprusch
73b4c64753 Translated using Weblate (German)
Currently translated at 100.0% (2509 of 2509 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/de/
2024-06-24 23:02:23 +03:00
Arya Khochare
a8b18ac807
MM-57013 Added download button for downloading logs from server logs page in system console (#26389)
* added download system logs

* download all logs

* download all logs check-lint fix

* check lint fix

* download logs api

* download logs api working

* download logs working with error log

* linting issues and code cleanup

* CI check fix

* documented the api and logs from file with error handling

* test and final changes done

* final changes done

* Fix order of server-side translations

* Fix incorrect indentation of logs.yaml

---------

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
2024-06-24 14:05:23 -04:00
Scott Bishel
71c25fb316
MM-58525 Fix upload file permissions (#27298)
* tie create_post and upload_file permissions together

* update tests

* update file name

* update migration to do in batches

* Update 000122_remove_upload_file_permission.up.sql

* fix formatting

* simplify migrations, fix regex issue

* update file names for recent merge

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-06-24 10:47:52 -06:00
Miguel de la Cruz
a181b3bc7b
Fix not enough return values in handleChannelCreation (#27430) 2024-06-24 09:27:35 +02:00
Miguel de la Cruz
d490fdc1d9
Marks the RemoteTeamId field of RemoteClusters as deprecated (#27364)
* Marks the RemoteTeamId field of RemoteClusters as deprecated

The `RemoteTeamId` was used both in the `RemoteCluster` model and as
part of remote invites. It existed so two different remotes could have
multiple secure connections between them, and have each of those
connections scoped to a team, sharing through each only the channels
that belong to their corresponding team.

The way that we're thinking on the feature currently only contemplates
one secure connection between two servers, and shares all the
channels through that secure connection, so this field is no longer
needed.

As we don't have a system in place for the user to choose in which
team a channel should be created from an invite, this change adds a
mechanism that checks the invite for a teamId, and if it's not
present, fetches a team from the database to create the channel
into. This makes the change backwards compatible for secure
connections that already have an established behavior and allows us to
move forward with the implementation of an alternative.

* Mark invite teamId field as deprecated

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-06-22 23:08:55 +02:00
Harrison Healey
6e5c741a7b MM-59033 Increase maximum bucket size for Load Event End metric 2024-06-21 17:47:39 -04:00
Christopher Poile
5823edf2c2
[MM-59037] Prepackage calls v0.28.2 for v9.10 (#27425) 2024-06-21 09:56:05 -04:00
lindalumitchell
d811bd9e1d
Update link preview URL in test-search.md (#27398) 2024-06-20 14:48:22 +08:00
enzowritescode
a624c6dc87
Add saml private key to gitignore, remove unused constants (#27391) 2024-06-19 10:03:28 -06:00
Harrison Healey
cca0db7e32
MM-58823 Remove feature flag from client metrics (#27397) 2024-06-19 10:45:23 -04:00
Harrison Healey
5defc75e46
MM-57913 Increase maximum length of Preferences.Value column (#27297)
* MM-57913 Increase maximum length of Preferences.Value column

* Add missing column name to migration

* Lowercased table and column names
2024-06-19 10:39:37 -04:00
Doug Lauder
8181a9ddff
MM-57867 Don't delete existing DM on invitation error (#27357)
* ensure channel invitations create new channels; don't delete pre-existing channels on failure cleanup

* update comment
2024-06-19 16:20:46 +02:00
Devin Binnie
f41e8ad756
[MM-57489] Check for StatusCode when receiving responses from the push proxy (#27392) 2024-06-19 09:18:26 -04:00
Daniel Schalla
1bbc3b4e83
[MM-58560] Configurable session revocation during password resets (#27286)
* [MM-58560] Allow for configurable session revocation during password reset

* Missing i18n additions

* Update Settings Wording

* Update Settings Wording #2

* Update default_config.ts for Session Termination

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-06-18 21:13:29 +02:00
Matheus
cbd5d95bbb
[MM-57988] Fix move thread logic to not block channel admins (#27061)
* mm-57988: Allowing for channel admins to move thread

* Fix the MoveThread team admin unit test that was introduced

* Renaming the hasPermittedRole function to hasPermittedWranglerRole

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-06-18 13:41:49 -04:00
Ben Cooke
9187c772b6
[MM-56074] mmctl job commands (#26855)
* add job list and update  job status command to mmctl
2024-06-17 12:07:05 -04:00
Rajat Dabade
5894abc36e
[MM-58315]: prepackage boards to v9.5+ (#27307)
* [MM-58315]: prepackage boards to v9.5+

* chore: changes the name of focalboard artifacts
2024-06-17 18:30:06 +05:30
Weblate (bot)
e92de72cfc
Translations update from Mattermost Weblate (#27378)
* Translated using Weblate (French)

Currently translated at 83.2% (4806 of 5772 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/fr/

* Translated using Weblate (Polish)

Currently translated at 100.0% (2506 of 2506 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/pl/

* Translated using Weblate (German)

Currently translated at 100.0% (2506 of 2506 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/de/

* Translated using Weblate (Swedish)

Currently translated at 100.0% (2506 of 2506 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/sv/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2506 of 2506 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/ja/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (5772 of 5772 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/ja/

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 3.7% (215 of 5772 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 3.9% (228 of 5772 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 4.3% (252 of 5772 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 4.3% (252 of 5772 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/

* Translated using Weblate (French)

Currently translated at 83.2% (4808 of 5772 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/fr/

* Translated using Weblate (French)

Currently translated at 83.4% (4815 of 5772 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/fr/

---------

Co-authored-by: boristrbrt <boris.trombert@gmail.com>
Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: Frank Paul Silye <frankps@uio.no>
Co-authored-by: Zenocode <zenocode@protonmail.com>
2024-06-17 09:46:03 -03:00
Ben Schumacher
01958bb5dc
[MM-58039] Enable errcheck linter for enterprise/saml package (#26909) 2024-06-17 05:10:39 +02:00
Christopher Poile
a316dfb80b
[MM-58296] Update prepackage calls to v0.28.1 for MM v9.10 (#27352)
Co-authored-by: Mattermost Build <build@mattermost.com>
2024-06-15 10:12:06 -04:00
Alejandro García Montoro
d81ce03168
MM-57839: Rewrite static assets only if needed (#27076)
* Rewrite static assets only if needed

Refactor UpdateAssetsSubpathInDir so that the actual rewriting of files
happen in two different functions: one for root.html, another for
manifest.json and *.css files.

I would have wanted to simply do a

  if pathToReplace == newPath { return nil }

when those two variables are defined, but the logic for root.html is not
that simple, and that may miss some edge cases, so I opted out for
simply moving the actual rewriting to individual functions, which check
for their corresponding conditions to perform the update:
  1. for root.html, check that the edited file is indeed different than
     the original one
  2. for manifest.json and *.css files, rewrite them only if
     pathToReplace != newPath, which in this case is clear that that's the
     only modification we do

* Fix expected error msg in test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-06-13 12:01:57 +02:00
Doug Lauder
bf8ddb4bdc
MM-57873 Check user visibility when accepting channel invites for DMs (#27331)
* check user visibility when accepting channel invites for DMs

* stronger visibility checking for DM users

* check for correct remoteid for remote user in DM invite

* fix unit test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-06-13 11:40:31 +02:00
Miguel de la Cruz
9733694854
Updates remote user creation process to preserve username and email (#27334)
This change makes sure that the original username and email are always
preserved when creating a user coming from a remote cluster.
2024-06-13 09:56:39 +02:00
Claudio Costa
4b0ae20ef7
Pass remote address in WebSocketMessageHasBeenPosted plugin hook (#27332) 2024-06-13 09:01:49 +02:00
Daniel Espino García
1ec2de4a95
Add mobile metrics (#27045)
* Add mobile metrics

* Fix mocks

* Add tests

* Fix lint

* Address feedback

* Fix lint

* Fix test

* Fix CI

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-06-12 11:33:04 +02:00
Ibrahim Serdar Acikgoz
691386a814
[MM-53356] server/app/migrations: refactor app migrations (#23958) 2024-06-12 10:08:57 +02:00
Eva Sarafianou
1d704745b7
Remove gobom files (#27140) 2024-06-11 19:15:24 +03:00