summaryrefslogtreecommitdiffstats
path: root/cmd
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2Martin Kraft2018-05-177-46/+40
| |\ \ \
| * | | | MM-10234: Make CLI roles command advanced-permissions aware. (#8771)George Goldberg2018-05-172-5/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * MM-10234: Make CLI roles command advanced-permissions aware. * Fix for loop scope. * Fix style.
* | | | | MM-10731 Revert site url kill server (#8877)Christopher Speller2018-05-302-23/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Revert "MM-9983 Requiring SiteURL to be set. (#8769)" This reverts commit 0432f995ec27de9ee6cc2f5847d4a17fcc095a26. * Add log message for SiteURL not being set.
* | | | | Revert "MM-6839: search relative to executable (#8853)" (#8876)Christopher Speller2018-05-291-10/+12
| | | | | | | | | | | | | | | This reverts commit d3cf110620033f8831a55a3fd911d7864b6aab4a.
* | | | | MM-6839: search relative to executable (#8853)Jesse Hallam2018-05-291-12/+10
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | | | Fixing CMD docs. (#8827)Christopher Speller2018-05-182-3/+3
| | | |
* | | | MM-9983 Requiring SiteURL to be set. (#8769)Christopher Speller2018-05-182-2/+24
| |_|/ |/| | | | | | | | | | | | | | | | | | | | * Requiring SiteURL to be set. * Modifying to make tests pass. * Fixing test.
* | | Renaming platform binary to mattermost. (#8801)Christopher Speller2018-05-1738-249/+297
| |/ |/|
* | MM-8708 Remove api package (#8784)Joram Wilander2018-05-167-46/+40
|/ | | | | | | | | | | | | | | | | | | | | | * Remove api package * Remove api dependency from cmd package * Remove EnableAPIv3 setting * Update web tests * Add more websocket tests * Move some ws and oauth tests to api4 package * Move command tests into api4 package * Test fixes * Fix msg command test * Add some app file tests
* Merge remote-tracking branch 'origin/release-4.10' into merge410rc5Derrick Anderson2018-05-152-1/+17
|\
| * [MM-9720] fix bugs when trying to change for a in use email and check the ↵Carlos Tadeu Panato Junior2018-05-112-1/+17
| | | | | | | | number of parameters (#8772)
* | Refactor context out of API packages (#8755)Joram Wilander2018-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Refactor context out of API packages * Update function names per feedback * Move webhook handlers to web and fix web tests * Move more webhook tests out of api package * Fix static handler
* | MM-4998 Adding LoginIdAttribute to allow LDAP users to change their login ID ↵Christopher Speller2018-05-101-0/+29
|/ | | | | | | | | | | | | | without losing their account (#8756) * Adding LoginIdAttribute * Modifying LDAP to use loginIDAttribute. * Adding IDAttribute migration and AD objectGUID support. * Removing unused idea. * Fix typo.
* Structured logging (#8673)Christopher Speller2018-04-276-22/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implementing structured logging * Changes to en.json to allow refactor to run. * Fixing global logger * Structured logger initalization. * Add caller. * Do some log redirection. * Auto refactor * Cleaning up l4g reference and removing dependancy. * Removing junk. * Copyright headers. * Fixing tests * Revert "Changes to en.json to allow refactor to run." This reverts commit fd8249e99bcad0231e6ea65cd77c32aae9a54026. * Fixing some auto refactor strangeness and typo. * Making keys more human readable.
* MM-10121: CLI command to reset permissions system to default state. (#8637)George Goldberg2018-04-181-0/+66
| | | | | | * MM-10121: CLI command to reset permissions system to default state. * Review comment.
* add app shutdown to make sure the goroutines finish and all process are ↵Carlos Tadeu Panato Junior2018-04-1711-1/+42
| | | | | | | | closed (#8629) * run the send email verification as goroutine as well * add app shutdown to make sure all go routines finish
* Fixed the example text on CLI channel command (#8613)Jesús Espino2018-04-131-2/+2
|
* Add list command to teams command in CLI (#8612)Jesús Espino2018-04-122-0/+45
| | | | | | * Add list command to teams command in CLI * Using App instead of Store to get the teams
* MM-9849 Added tracking of which settings are set through environment ↵Harrison Healey2018-04-092-2/+2
| | | | | | | | | | | | | | | | variables (#8586) * MM-9849 Added tracking of which settings are set through environment variables * Removed old version of viper * Added forked version of viper * Fixed unit tests * Fixed more unit tests * Removed copy from App.GetEnvironmentConfig
* Migrate Advanced Permissions Roles when needed on cli commands (#8535)Jesús Espino2018-04-041-0/+2
|
* Fixing misspell errors (#8544)Jesús Espino2018-03-292-3/+3
|
* Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1Martin Kraft2018-03-271-0/+7
|\
| * Changing the user-0 data to sysadmin and user-1 username to user-1 (#8494)Jesús Espino2018-03-231-0/+7
| |
* | Merge branch 'master' into advanced-permissions-phase-1Martin Kraft2018-03-232-0/+7
|\|
| * Improved bulkload error handling (#8491)Jesse Hallam2018-03-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | * log the config file path used by the server on startup * return an err if the bulk import command fails * log the underlying errors that occur when importing The code assumed all errors meant a missing resource, but it's possible something else is at fault. Including the error helps pinpoint that more readily.
| * Timezone feature (#8185)Chris Duarte2018-03-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add supported timezones into config Remove Timezone list creation in favor of timezone from configs Add Timezone field to Users table Clean up format of SupportedTimezones in config * Remove unwanted change * Add test for updating user timezone * Add empty map[string]string if Timezone is null * Add EnableTimezoneSelection config * Revert back to map[string]string for ClientConfig * Refactor SupportedTimezones into timezones.json * Include timezones.json in TestConfigFlag * Add timezone api endpoint * Bump varchar size to 256 and setMaxSize in user_store * Refactor LoadConfig to LoadConfig and LoadTimezoneConfig * Remove unnecessary argument in LoadConfig, mail_test * Add test for timezone endpoint * Add license header * Refactor timezones endpoint to system.go * Add system base route to timezone endpoint * db timezone upgrade in db v4.9 * Avoid saving SupportedTimezones to config.json * Add timezonePath support in config * Remove EnableTimezoneSelection from config * Use return statement without return parameter * Refactor test for SupportedTimezones * Check for supportedTimezone != nil instead of using len * Decouple SupportedTimezones out of Config * Fix failing test * Add LastTeamIconUpdate back in upgrade.go * Write timezone config in config_flag_test * Add code fallback for default timezone support
* | Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-191-2/+2
|\|
| * Merge remote-tracking branch 'origin/release-4.8' into t3mergetomasterDerrick Anderson2018-03-121-2/+2
| |\
| | * Fix saml users.json parameter (#8435)Jesús Espino2018-03-121-2/+2
| | |
* | | Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-1336-561/+696
|\| |
| * | [MM-9720] Platform command to change user email address (#8422)Carlos Tadeu Panato Junior2018-03-122-0/+68
| | |
| * | Adding enterprise commands support (#8327)Jesús Espino2018-03-0736-555/+625
| | |
| * | general cleanup (#8387)Chris2018-03-071-6/+3
| |/
* | Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-021-27/+162
|\|
| * Adding saml migration command (#8263)Jesús Espino2018-02-211-27/+162
| | | | | | | | | | | | * Adding saml migration command * Texts fixed
* | Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-193-5/+114
|\|
| * Upgrading server dependancies (#8308)Christopher Speller2018-02-161-0/+3
| |
| * Send systemd READY notification (#8296)Pierre de La Morinerie2018-02-152-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when starting Mattermost programmatically, it's hard to tell when the server is actually ready to receive network connections. This isn't convenient for monitoring (the systemd service status is "running" although the server is still booting), nor for programatic use (where a script would need to know when the server is ready to perform further actions). To improve this, systemd allow processes to tell when they started successfully. The launcher waits for this notification before reporting the service as successfully launched. The way processes notify systemd is by sending a `READY=1` string over a standard unix socket, whose path is provided in an environment var. The systemd service is then told to expect this notification: ```diff [Service] -Type=simple +Type=notify ExecStart=/home/vagrant/go/bin/platform ``` Now, when starting the server, systemd will actually wait for the server to be ready before returning the control to the shell. Additionally, during this time, querying the server status with `service mattermost status` will report the service as "activating" – before transitioning to "running" when the server is ready.
| * Wait for goroutines to finish before shuting down server (#8259)Pierre de La Morinerie2018-02-141-5/+15
| | | | | | | | | | | | | | | | When running server tests, the server will exit while some jobs spawned through a goroutine are still running. This may crash the test harness, as the jobs try to access a shut down app instance. Fortunately the fix is easy: we just have to use the same App goroutine-counting facility than the rest of the method's goroutines.
* | Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-133-6/+78
|\|
| * Add tests for the `platform server` command (#8231)Pierre de La Morinerie2018-02-122-5/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Cleanup app state on initialization error When returning an initialization error, the app state was not cleaned up. This is especially visible during tests, as `appCount` is not decremented, and makes the new app initialization fail. * Test the `platform server` command As the `platform server` command only exits when interrupted by a signal, it is not possible to test it as the other cobra commands. Instead we directly test the actual command function. The internal command handler is slighly refactored to take a channel in argument, and registers it as the signal handler. Nothing very different—except than controlling this channel from the outside allows the test to send the system signal itself, thus preventing the server to run forever.
| * Remove license globals entirely (#8229)Chris2018-02-091-1/+1
| | | | | | | | | | | | | | | | * remove license globals entirely * fix infinite recursion * test fix
* | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1Jesús Espino2018-02-074-10/+61
|\|
| * PLT-7537: Move channel CLI command posts system message to channel. (#8161)Vordimous2018-02-072-4/+40
| | | | | | | | | | | | | | | | | | | | | | | | * [PTL-7537] implement feature and test * [PTL-7537] Update feature to post the the room requiring a username flag to be used * [PTL-7537] update tests with username * update test to remove changes to the test helper struct * use the basic team and user
| * Abort on critical error during server startup (#8204)Pierre de La Morinerie2018-02-072-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only a handful of critical errors are present in the codebase. They all occur during server startup (in `app.StartServer()`). Currently, when one of these critical error occurs, it is simpled mentionned in the logs – then the error is discarded, and the app attempts to continue the execution (and probably fails pretty quickly in a weird way). Rather than continuing operations in an unknow state, these errors should trigger a clean exit. This commit rewrites critical startup errors to be correctly propagated, logged, and then terminate the command execution. Additionnaly, it makes the server return a proper error code to the shell.
| * add App.License, remove utils.IsLicensed / utils.License calls (#8203)Chris2018-02-061-2/+4
| |
* | Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-063-11/+16
|\|
| * report server launch errors (#8189)Pierre de La Morinerie2018-02-021-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When starting the server using `platform server`, errors occuring during startup are not reported in the console. The command exit with a 0 exit code (i.e. "success"), although the server failed to launch. With this change, when an error occurs while initializing the app (like a missing or invalid configuration file): - the error is printed to the console; - the command exit with a "-1" exit code. This allow shell scripts to properly detect the startup failure, and to react to it. Example of error displayed: ``` $ platform server Error: LoadConfig: Error decoding config file=config.json, err=While parsing config: invalid character ':' after top-level value, ``
| * Use default configurations for user-0 in sampledata (#8174)Jesús Espino2018-01-311-4/+4
| |
| * Upgrading server dependancies (#8154)Christopher Speller2018-01-291-0/+3
| |