summaryrefslogtreecommitdiffstats
path: root/cmd
Commit message (Collapse)AuthorAgeFilesLines
* MM-12356 Add cli command "command delete" (#9553)Shobhit Gupta2018-10-232-0/+60
| | | | | | | | | | | | | | | | * Add cli command for deleting commands * Add code/test for delete command * Fix test * Add confirm flag * Update as per comments * Uncomment test * Fix test
* MM-12372 Add modify-incoming webhook command (#9683)Artur Mogozov2018-10-192-1/+122
| | | | | | * MM-12372 Add modify-incoming webhook command * Review comments
* MM-12368 Add create webhook-incoming command (#9566)Artur Mogozov2018-10-162-0/+97
|
* [MM-12362] Add CLI command 'config show' (#9536) (#9564)Mukul Rawat2018-10-152-2/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add the subcommand by creating a new Command instance. * Implemented the structure of the subcommand function. * Register our new command * Write some helper functions * finish the pretty print function * write some test for config show * Refactor and extract the tab printing functionality in its own function * Use app.Config() to create our config object & accept incoming changes * Removed reading the file, make helper functions return string and perform printing inside the command * Remove the previous code for checking presence of arguments and use 'cobra.NoArgs()' instead * Remove named return and instead declare the variable and then return it. * Remove printTab function and simplify printing out tabs using strings.Repeat * Add some functions to test the output * Update the usage and remove a comment * Update the print
* [MM-12363] Added Team archive command to archive a team by name (#9565)Wasim Thabraze2018-10-152-2/+98
| | | | | | | | * Added Team archive command to archive a team by name * Team archive command now uses SoftDelete method Team search and list command now shows archived teams with the term '(archived)' appended to them
* [MM-12360] Created CLI command "config get" (#9534) (#9558)Mukul Rawat2018-10-152-0/+507
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added the get command to get the value of a config setting. * Depending on the config setting it can work on any depth of the setting. * Added test for the get command. * Add print tabs * Remove excess else statements * Return with the value and remove named return variable * Refactor the printMap function and return a string, remove side effects * Improve the error message, use the name argument * Use app.Config() to create our config object * Remove reading the file, make helper functions return string and perform printing inside the command * Remove the tab printing * Add extra quotes on the output * Remove extra code for checking arguments and replaced it with cobra.ExactArgs(1) * Remove buffer from printConfigValues * Add some tests to check the output of the command * Write test for the function 'structToMap' and test for complext nested structs * Write test for the function 'configToMap' and test for complext nested structs * Write test for the function 'printMap' and test for complext maps as input * Write test for the function 'printConfigValues' and test for complext maps as input * Remove commented code * Update the description of the command
* MM-12355: Add CLI command "command create" (#9569)Jason Mojica2018-10-132-0/+218
| | | | | | | | | | * Add create command * Create CreateCommand Tests * Change method flag description * Change nil test assertion
* MM-12251: Add flag to MoveChannel to remove all deactivated users. (#9515)George Goldberg2018-10-081-3/+6
|
* Small fix in the webhook list error handling (#9567)Jesús Espino2018-10-051-1/+1
|
* MM-12357: Add CLI command "team list" (#9531)Ashutosh Kumar2018-10-051-0/+47
| | | | | | | | | | | | | | * (feat:command list)add command list for teams Signed-off-by: sonasingh46 <sonasingh46@gmail.com> * address review comments Signed-off-by: sonasingh46 <sonasingh46@gmail.com> * address review comments Signed-off-by: sonasingh46 <sonasingh46@gmail.com>
* MM-12371 Add webhook list command (#9528)Ben Echols2018-10-042-0/+135
| | | | | | | | | | | | | | | | * Added start of the webhook command * start of unit tests * created a simple hook for unit test * added outgoing as well * have it all working * Add license headers to the files * Addressing code review, fixed print reverted sql change
* Fix CMD Init. Error Checks (#9547)Daniel Schalla2018-10-031-1/+1
|
* [MM-12367] Added CLI command 'team search' (#9512)Wasim Thabraze2018-10-032-0/+87
| | | | | | | | | | | | | | * Added 'search' sub-command for the command 'team' to search across teams with name * Addressed code review * Moved 'removeDuplicatesAndSortTeams' function to team.go Addressed more code reviews * Added unit test case for team search command * Added unit test case to test searching of teams by display name
* MM-10699: Disallow renaming direct and group message channels (#9518)Jesús Espino2018-10-021-3/+3
| | | | | | * MM-10699: Disallow renaming direct and group message channels * Replacing errors.New with errors.Wrapf
* Adding arg spec to bulk export. (#9453)Christopher Speller2018-09-251-0/+1
|
* Move file backend to its own service (#9435)Jesús Espino2018-09-201-1/+2
| | | | | | * Move file backend to its own service * Moving utils/inbucket to mailservice package
* MM-11781: Basic Data Export Command Line. (#9296)George Goldberg2018-09-172-6/+52
| | | | | | | | | | | | | | | | * MM-11781: Basic Data Export Command Line. * ChannelStore new unit tests. * TeamStore new unit tests. * Unit test for new UserStore function. * Unit tests for post store new methods. * Review fixes. * Fix duplicate command name.
* fixing log messages (#9341)Carlos Tadeu Panato Junior2018-09-171-1/+1
| | | | | | | | | | | | * fixing log messages * update per review * Update notification.go * Update server.go * Update notification.go
* MM-11882: Remove all users from a channel via CLI. (#9381)George Goldberg2018-09-101-10/+29
|
* add megacheck as makefile target (#9288)Daniel Schalla2018-09-032-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Fix code issues in channel_test.go Fix Channel Test Issues detected by Megacheck Fix API Emoji Test Issues detected by Megacheck Fixed API Issues Reported by Megacheck Fixed App issues reported by megacheck Remaining fixes removed test added by mistake from old HEAD gofmt Store Fixes simplified returns Fix test for multi member channel delete revert to delete unused function
* add --username in the example for the commands (#9320)Carlos Tadeu Panato Junior2018-08-291-6/+6
| | | | | | * add --username in the example for the commands * update per review
* MM-11572: Force correct order on messages generated in the bulk (#9244)Jesús Espino2018-08-241-7/+22
|
* Merge remote-tracking branch 'upstream/release-5.2' into ↵cpanato2018-08-102-8/+6
|\ | | | | | | release-5.2-daily-merge-20180810
| * MM-11637: avoid stopping unstarted jobs (#9240)Jesse Hallam2018-08-092-8/+6
| | | | | | | | | | The new locking primitives in 5.2 around jobs assume the worker/scheduler was actually started, so don't try to stop if not started.
* | avoid t.Fatal() in tests (#9189)Jesse Hallam2018-08-092-7/+5
|/ | | | | | I've been burned a few times by tests that simply fatal, requiring me to run another build to learn more about what the mismatch was. Avoid this. This is part of a long running goal of mine to make testing "better".
* Remove global-relay export command from the cli (#9226)Jesús Espino2018-08-081-10/+0
|
* MM-11243: Make Elasticsearch work after enabling without restart. (#9146)George Goldberg2018-07-261-5/+1
| | | | | | * MM-11243: Make Elasticsearch work after enabling without restart. * Also cope with config vars changing whilst enabled.
* unpack prepacked plugins on plugins initialization (#9149)Jesse Hallam2018-07-261-1/+1
| | | | | | * unpack prepackaged plugins on plugins initialization * leverage utils.FindDir
* Add idiomatic error handling in mattermost commands (#9147)Jesús Espino2018-07-243-13/+24
|
* MM-11003: Global Relay Export Refactor (#9136)Jesús Espino2018-07-201-0/+10
|
* MM-10699 Add channel renaming to CLI (#9094)Druhin Bala2018-07-182-0/+56
|
* [MM-10117] Add support to add/delete and enable/disable plugins via CLI (#8745)Santos Solorzano2018-07-113-0/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Testing caching for emojis * MM-10117 Add support to add/delete and activate/deactivate plugins via CLI * Removing old work * MM-10117 Moved files and addedd plugin test * MM-10117 Renamed commands to enable/disable and updated add test * MM-10117 Finished plugin test and improved error message for plugin commands * MM-10117 Fixing plugin directories for test * MM-10117 Renamed commands and updated commands to support multiple plugins * MM-10117 Updating removed to deleted textclear * MM-10117 Fixing nil pointer error for listing plugins * MM-10117 Removing fileReader close * MM-10117 Declaring error for GetPlugins * MM-10117 Removing unnecessary nil check
* Merge branch 'plugins-2'JoramWilander2018-07-101-2/+2
|\
| * Merge branch 'master' into plugins-2JoramWilander2018-07-071-2/+0
| |\
| * | MM-10702 Moving plugins to use hashicorp go-plugin. (#8978)Christopher Speller2018-06-251-2/+2
| | | | | | | | | | | | | | | | | | * Moving plugins to use hashicorp go-plugin. * Tweaks from feedback.
* | | MM-11120 Adding setting to disable email invitations and rate limiting. (#9063)Christopher Speller2018-07-101-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Adding setting to disable email invitations. * Adding a setting and rate limiting for email invite sending. * Modifying email rate limit to 20/user/hour * Adding EnableEmailInvitations to client side config and command.
* | | MM-11110: Fixes CLI error message. (#9062)Martin Kraft2018-07-091-1/+1
| |/ |/|
* | Make sure diagnostic ID is loaded before client config. (#9032)George Goldberg2018-07-031-2/+0
|/
* MM-8810: Add CSV Compliance export (#8966)Jesús Espino2018-06-223-14/+70
| | | | | | | | | | | | * MM-8810: Add CSV Compliance export * Only allowing to schedule actiances export throught the cli * De-duplicating some code * Fixes on texts * Fixes on translations
* MM-10370: serve subpath (#8968)Jesse Hallam2018-06-211-3/+2
| | | | | | | | | | | | | | | | | | | | | | | * factor out GetSubpathFromConfig * mv web/subpath.go to utils/subpath.go * serve up web, api and ws on /subpath if configured * pass config to utils.RenderWeb(App)?Error This allows the methods to extract the configured subpath and redirect to the appropriate `/subpath/error` handler. * ensure GetSubpathFromConfig returns trailing slashes deterministically * fix error 404 handling * redirect /subpath to /subpath/ This is necessary for the static handler to match, otherwise none of the registered routes find anything. This also makes it no longer necessary to add trailing slashes in the root router.
* MM-10367: rewrite subpath assets on startup (#8944)Jesse Hallam2018-06-141-2/+36
| | | | | | | | | Examine ServiceSettings.SiteURL on startup and rewrite assets accordingly if not in a development environment. Also export `mattermost config subpath` command to manually do same. This accompanies a webapp PR to use the updated `root.html` to define the necessary webpack asset path for dynamically loading assets.
* MM-10684: Show logs on Slack Import CLI. (#8936)George Goldberg2018-06-111-1/+10
|
* MM-6839: searching for paths relative to executable (#8915)Jesse Hallam2018-06-061-13/+12
| | | | | | | | | | | | | | | | | | * MM-6839: search relative to executable (#8853) * MM-6839: searching for paths relative to executable In addition to searching relative to the current working directory, also search relative to the location of the binary. This helps locate config and i18n files when invoking an absolute path to the mattermost binary. * MM-6839: find mattermost/ binary using utils.FindFile * add unit tests for utils.FindFile to exclude directories * fix filtering out directories in FindFile * fix platform invoking ./bin/mattermost
* Merge branch 'advanced-permissions-phase-2'George Goldberg2018-05-316-5/+168
|\
| * Add note about clearing caches when permissions reset CLI done. (#8823)George Goldberg2018-05-301-1/+3
| | | | | | | | | | | | * Add note about clearing caches when permissions reset CLI done. * Adjust text.
| * MM-8853: Adding MANAGE_EMOJIS and MANAGE_OTHERS_EMOJIS permissions (#8860)Jesús Espino2018-05-292-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * MM-8853: Adding MANAGE_EMOJIS and MANAGE_OTHERS_EMOJIS permissions * MM-8853: Removing unnecesary emoji enterprise feature * Create emojis migration * Adding MANAGE_EMOJIS and MANAGE_OTHERS_EMOJIS always to system admins * Simplifing permissions checks * Revert "Simplifing permissions checks" This reverts commit e2cafc1905fc9e20125dd9a1552d2d0c7340ae59.
| * Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2Martin Kraft2018-05-224-5/+27
| |\
| * | Merge fix.Martin Kraft2018-05-181-0/+0
| | |
| * | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2Martin Kraft2018-05-1838-251/+300
| |\ \
| * | | MM-10264: Adds CLI command to import and export permissions. (#8787)Martin Kraft2018-05-172-0/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * MM-10264: Adds CLI command to import and export permissions. * MM-10264: Changes Scheme Name to DisplayName and adds Name slug field. * MM-10264: Changes display name max size. * MM-10264: Another merge fix. * MM-10264: Changes for more Schemes methods checking for migration. * MM-10264: More updates for Schemes migration checking.