mattermost/server/cmd/mmctl/commands
Jesse Hallam 84e267e9e8
[MM-66789] Restrict ImportSettings.Directory changes via API and add validation (#34653)
This change enhances security by preventing ImportSettings.Directory from being modified through the API and adds validation to prevent directory conflicts.

Changes:

- Restricted ImportSettings.Directory from being changed via API

- Added validation to prevent directory conflicts with plugin directory

- Added error message translation

- Updated and added comprehensive tests

Co-authored-by: Mattermost Build <build@mattermost.com>
2026-01-06 16:30:07 +00:00
..
importer [MM-62775] Fix: Bulk export not completing (#30044) 2025-02-04 17:56:11 -05:00
auth.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
auth_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
auth_test.go [GH-26382] format command mmctl auth list (#26423) 2024-03-25 09:20:16 +01:00
auth_utils.go [MM-64844] Remove deprecated mmctl commands and flags (#33435) 2025-07-18 11:08:29 +02:00
auth_utils_test.go Improve mmctl test practices and error handling (#34079) 2025-10-14 12:28:27 +02:00
bot.go Simplify page size in mmctl (#26664) 2024-04-10 12:47:06 +02:00
bot_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
bot_test.go [MM-62179] Fix: mmctl debug error when setting email (#29953) 2025-01-29 23:45:11 +01:00
channel.go [MM-64844] Remove deprecated mmctl commands and flags (#33435) 2025-07-18 11:08:29 +02:00
channel_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
channel_test.go [MM-64844] Remove deprecated mmctl commands and flags (#33435) 2025-07-18 11:08:29 +02:00
channel_users.go [GH-21216] Function removeUserFromChannel return error (#26428) 2024-03-25 12:53:22 +01:00
channel_users_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
channel_users_test.go [MM-62179] Fix: mmctl debug error when setting email (#29953) 2025-01-29 23:45:11 +01:00
channelargs.go MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
channelargs_test.go MM-57245: Bump up Go version to 1.21 (#26512) 2024-03-21 09:12:35 +05:30
command.go [MM-64844] Remove deprecated mmctl commands and flags (#33435) 2025-07-18 11:08:29 +02:00
command_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
command_test.go Fix missing errors in mmctl output (#30567) 2025-03-28 09:30:41 +01:00
commandargs.go MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
completion.go [MM-57062] Update mmctl shell completion to v2 (#31287) 2025-07-18 15:29:01 +02:00
completion_test.go [MM-57062] Update mmctl shell completion to v2 (#31287) 2025-07-18 15:29:01 +02:00
compliance_export.go [MM-63557] mmctl: Add compliance export create cmd (#30594) 2025-06-24 21:38:30 +00:00
compliance_export_e2e_test.go Improve mmctl test practices and error handling (#34079) 2025-10-14 12:28:27 +02:00
compliance_export_test.go Improve mmctl test practices and error handling (#34079) 2025-10-14 12:28:27 +02:00
config.go Fix missing errors in mmctl output (#30567) 2025-03-28 09:30:41 +01:00
config_e2e_test.go [MM-66789] Restrict ImportSettings.Directory changes via API and add validation (#34653) 2026-01-06 16:30:07 +00:00
config_test.go MM-63726: Adjust default MaxOpenConns/MaxIdleConns settings (#33593) 2025-08-11 14:06:12 -03:00
docs.go Bump Go to v1.23.7 (#30455) 2025-03-17 14:22:07 +01:00
enterprise.go Use golangci-lints's build-in modernize linter (#34341) 2025-11-04 12:09:11 +01:00
errors.go MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
export.go Improve mmctl test practices and error handling (#34079) 2025-10-14 12:28:27 +02:00
export_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
export_test.go MMCTL: Add import delete cmd for removing the import files (#29764) 2025-06-10 12:06:38 +02:00
extract.go [MM-56074] mmctl job commands (#26855) 2024-06-17 12:07:05 -04:00
extract_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
group.go OSF: Used model.NewPointer everywhere (#27838) 2024-08-06 09:15:00 +05:30
group_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
group_test.go OSF: Used model.NewPointer everywhere (#27838) 2024-08-06 09:15:00 +05:30
import.go MM-64807: Deprecate format parameter in client config endpoint (#33605) 2025-08-20 12:15:11 -03:00
import_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
import_test.go MM-64807: Deprecate format parameter in client config endpoint (#33605) 2025-08-20 12:15:11 -03:00
init.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
init_test.go MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
integrity.go MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
integrity_test.go OSF: Used model.NewPointer everywhere (#27838) 2024-08-06 09:15:00 +05:30
job.go [MM-56074] mmctl job commands (#26855) 2024-06-17 12:07:05 -04:00
job_test.go [MM-56074] mmctl job commands (#26855) 2024-06-17 12:07:05 -04:00
ldap.go [MM-64320] Remove deprecated include_removed_members option in api/v4/ldap/sync (#31121) 2025-07-17 12:35:08 +02:00
ldap_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
ldap_test.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
license.go chore: remove deprecated "io/ioutil" imports (#25119) 2023-11-16 12:15:30 +01:00
license_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
license_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
logs.go Simplify page size in mmctl (#26664) 2024-04-10 12:47:06 +02:00
logs_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
logs_test.go MM-57245: Bump up Go version to 1.21 (#26512) 2024-03-21 09:12:35 +05:30
main_test.go Use golangci-lints's build-in modernize linter (#34341) 2025-11-04 12:09:11 +01:00
mmctl_e2e_test.go Use golangci-lints's build-in modernize linter (#34341) 2025-11-04 12:09:11 +01:00
mmctl_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
mmctl_unit_test.go Use golangci-lints's build-in modernize linter (#34341) 2025-11-04 12:09:11 +01:00
oauth.go Simplify page size in mmctl (#26664) 2024-04-10 12:47:06 +02:00
oauth_test.go mmctl: add listing oauth apps (#25497) 2023-12-05 12:25:35 -05:00
permission_role_test.go [MM-62179] Fix: mmctl debug error when setting email (#29953) 2025-01-29 23:45:11 +01:00
permissions.go [MM-64844] Remove deprecated mmctl commands and flags (#33435) 2025-07-18 11:08:29 +02:00
permissions_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
permissions_reset_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
permissions_role.go [MM-61132] Fix example for mmctl permissions role show command (#28816) 2024-10-24 14:03:21 +02:00
permissions_role_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
permissions_test.go Mm 64495 manage access rules permissions (#31658) 2025-07-25 12:30:10 +02:00
plugin.go [GH-21224] return error in plugin cmd (#26305) 2024-03-05 13:18:30 +01:00
plugin_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
plugin_marketplace.go Simplify page size in mmctl (#26664) 2024-04-10 12:47:06 +02:00
plugin_marketplace_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
plugin_marketplace_test.go MM-57245: Bump up Go version to 1.21 (#26512) 2024-03-21 09:12:35 +05:30
plugin_test.go MM-57245: Bump up Go version to 1.21 (#26512) 2024-03-21 09:12:35 +05:30
post.go [MM-61758] Burn on read feature (#34703) 2025-12-11 07:59:50 +01:00
post_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
post_test.go [MM-56073] MMCTL delete post command (#27539) 2024-10-08 16:45:31 +02:00
report.go Add cursor-based Posts Reporting API for compliance and auditing (#34252) 2025-11-17 09:02:19 -07:00
report_test.go Add cursor-based Posts Reporting API for compliance and auditing (#34252) 2025-11-17 09:02:19 -07:00
roles.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
roles_test.go MM-57245: Bump up Go version to 1.21 (#26512) 2024-03-21 09:12:35 +05:30
root.go [MM-65830] Fix mmctl system status exit code for health check failures (#33970) 2025-10-06 10:49:46 +00:00
root_test.go Print panic message when mmctl panics (#27390) 2024-07-02 13:58:37 +02:00
saml.go MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
saml_test.go MM-57245: Bump up Go version to 1.21 (#26512) 2024-03-21 09:12:35 +05:30
sampledata.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
sampledata_test.go chore: remove deprecated "io/ioutil" imports (#25119) 2023-11-16 12:15:30 +01:00
sampledata_util.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
system.go [MM-64633] Rewrite Go client using Generics (#31805) 2025-10-07 12:19:21 +02:00
system_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
system_test.go [MM-64633] Rewrite Go client using Generics (#31805) 2025-10-07 12:19:21 +02:00
team.go [MM-64844] Remove deprecated mmctl commands and flags (#33435) 2025-07-18 11:08:29 +02:00
team_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
team_test.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
team_users.go MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
team_users_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
team_users_test.go [MM-62179] Fix: mmctl debug error when setting email (#29953) 2025-01-29 23:45:11 +01:00
teamargs.go MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
teamargs_test.go MM-57245: Bump up Go version to 1.21 (#26512) 2024-03-21 09:12:35 +05:30
token.go Simplify page size in mmctl (#26664) 2024-04-10 12:47:06 +02:00
token_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
token_test.go [MM-62179] Fix: mmctl debug error when setting email (#29953) 2025-01-29 23:45:11 +01:00
user.go mmctl: allow filtering users by role and displaying user roles (#34051) 2025-11-25 09:24:15 +01:00
user_attributes.go Updates buildFieldAttrs to preseve existing attrs when editing a field (#33991) 2025-10-01 11:00:06 +02:00
user_attributes_field.go Updates buildFieldAttrs to preseve existing attrs when editing a field (#33991) 2025-10-01 11:00:06 +02:00
user_attributes_field_e2e_test.go Adds default values to the attrs of CPA fields and refactors the app layer (#34408) 2025-11-13 12:00:54 +01:00
user_attributes_field_test.go Move mmctl cpa subcommands under mmctl user attributes (#33975) 2025-09-29 11:29:30 +00:00
user_attributes_test.go Updates buildFieldAttrs to preseve existing attrs when editing a field (#33991) 2025-10-01 11:00:06 +02:00
user_attributes_value.go Move mmctl cpa subcommands under mmctl user attributes (#33975) 2025-09-29 11:29:30 +00:00
user_attributes_value_e2e_test.go Adds default values to the attrs of CPA fields and refactors the app layer (#34408) 2025-11-13 12:00:54 +01:00
user_attributes_value_test.go Move mmctl cpa subcommands under mmctl user attributes (#33975) 2025-09-29 11:29:30 +00:00
user_e2e_test.go mmctl: allow filtering users by role and displaying user roles (#34051) 2025-11-25 09:24:15 +01:00
user_test.go mmctl: allow filtering users by role and displaying user roles (#34051) 2025-11-25 09:24:15 +01:00
userargs.go [MM-62179] Fix: mmctl debug error when setting email (#29953) 2025-01-29 23:45:11 +01:00
userargs_test.go [MM-62179] Fix: mmctl debug error when setting email (#29953) 2025-01-29 23:45:11 +01:00
utils.go MM-56632 Display warning if requested mage size exceeds max (#26022) (#27216) 2024-11-06 15:45:56 +01:00
utils_test.go Correctly merge plugin configuration on mmctl config patch (#26647) 2024-07-08 11:54:40 +02:00
utils_unix.go Use golangci-lints's build-in modernize linter (#34341) 2025-11-04 12:09:11 +01:00
utils_unix_test.go MM-54264: Unblock TestCheckValidSocket (#26021) 2024-01-24 20:43:01 +05:30
utils_windows.go Fix "doesn't exists" typo (#26307) 2024-02-27 08:13:12 +05:30
version.go [MM-53256] Use buildinfo instead of env variables for mmctl (#23794) 2023-10-20 11:23:05 +02:00
version_test.go [MM-53256] Use buildinfo instead of env variables for mmctl (#23794) 2023-10-20 11:23:05 +02:00
webhook.go Add missing parenthesis in mmctl webhook list (#28778) 2024-10-17 07:45:10 +02:00
webhook_e2e_test.go Fix errcheck linter errors in helpers (#31578) 2025-11-12 13:00:51 +01:00
webhook_test.go [MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
websockets.go [MM-55739] Allow admins to pipe the output of mmctl websocket into JSON parser (#25545) 2023-11-27 12:45:32 +01:00