From 09d3ac79f11a6cc4662162ea44e7f12ff83613ca Mon Sep 17 00:00:00 2001 From: it33 Date: Fri, 4 Dec 2015 16:20:48 -0800 Subject: [PATCH 1/3] Updating mattermost.go help --- mattermost.go | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/mattermost.go b/mattermost.go index eaab1de88a..da50a26c31 100644 --- a/mattermost.go +++ b/mattermost.go @@ -535,12 +535,14 @@ func flushLogAndExit(code int) { } var usage = `Mattermost commands to help configure the system -Usage: +NAME: + platform -- platform configuation tool + +USAGE: platform [options] - - -version Display the current version - + +FLAGS: -config="config.json" Path to the config file -email="user@example.com" Email address used in other commands @@ -557,10 +559,8 @@ Usage: is used to help administer one team. "system_admin" - Represents a system admin who has access to all teams - and configuration settings. This - role can only be created on the - team named "admin" - + and configuration settings. +COMMANDS: -create_team Creates a team. It requires the -team_name and -email flag to create a team. Example: @@ -572,7 +572,7 @@ Usage: platform -create_user -team_name="name" -email="user@example.com" -password="mypassword" -assign_role Assigns role to a user. It requires the -role, - -email and -team_name flag. You may need to logout + -email and -team_name flag. You may need to log out of your current sessions for the new role to be applied. Example: @@ -584,18 +584,19 @@ Usage: platform -reset_password -team_name="name" -email="user@example.com" -password="newpassword" -permanent_delete_user Permanently deletes a user and all related information - include posts from the database. It requires the + including posts from the database. It requires the -team_name, and -email flag. You may need to restart the - server to invlidate the cache + server to invalidate the cache Example: platform -permanent_delete_user -team_name="name" -email="user@example.com" -permanent_delete_team Permanently deletes a team and all users along with - all related information including posts from the database. + all related information including posts from the database. It requires the -team_name flag. You may need to restart the server to invalidate the cache. Example: platform -permanent_delete_team -team_name="name" + -version Display the current of the Mattermost platform -` + -help Displays this help page` From 197d1c5ab640815939caad95d318cac68224a593 Mon Sep 17 00:00:00 2001 From: it33 Date: Fri, 4 Dec 2015 16:32:04 -0800 Subject: [PATCH 2/3] Create Command-Line_Tools.md --- doc/install/Command-Line_Tools.md | 81 +++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 doc/install/Command-Line_Tools.md diff --git a/doc/install/Command-Line_Tools.md b/doc/install/Command-Line_Tools.md new file mode 100644 index 0000000000..05a1d480a9 --- /dev/null +++ b/doc/install/Command-Line_Tools.md @@ -0,0 +1,81 @@ +# Command Line Tools + +From the directory where the Mattermost platform is installed a `platform` command is available for configuring the system, including: + +- Creating teams +- Creating users +- Assigning roles to users +- Reseting user passwords +- Permanently deleting users (use cautiously - database backup recommended before use) +- Permanently deleting teams (use cautiously - database backup recommended before use) + +Typing `mattermost -help` brings up the below documentation on usage. + +``` +Mattermost commands to help configure the system + +NAME: + platform -- platform configuation tool + +USAGE: + platform [options] + +FLAGS: + -config="config.json" Path to the config file + + -email="user@example.com" Email address used in other commands + + -password="mypassword" Password used in other commands + + -team_name="name" The team name used in other commands + + -role="admin" The role used in other commands + valid values are + "" - The empty role is basic user + permissions + "admin" - Represents a team admin and + is used to help administer one team. + "system_admin" - Represents a system + admin who has access to all teams + and configuration settings. +COMMANDS: + -create_team Creates a team. It requires the -team_name + and -email flag to create a team. + Example: + platform -create_team -team_name="name" -email="user@example.com" + + -create_user Creates a user. It requires the -team_name, + -email and -password flag to create a user. + Example: + platform -create_user -team_name="name" -email="user@example.com" -password="mypassword" + + -assign_role Assigns role to a user. It requires the -role, + -email and -team_name flag. You may need to log out + of your current sessions for the new role to be + applied. + Example: + platform -assign_role -team_name="name" -email="user@example.com" -role="admin" + + -reset_password Resets the password for a user. It requires the + -team_name, -email and -password flag. + Example: + platform -reset_password -team_name="name" -email="user@example.com" -password="newpassword" + + -permanent_delete_user Permanently deletes a user and all related information + including posts from the database. It requires the + -team_name, and -email flag. You may need to restart the + server to invalidate the cache + Example: + platform -permanent_delete_user -team_name="name" -email="user@example.com" + + -permanent_delete_team Permanently deletes a team and all users along with + all related information including posts from the database. + It requires the -team_name flag. You may need to restart + the server to invalidate the cache. + Example: + platform -permanent_delete_team -team_name="name" + + -version Display the current of the Mattermost platform + + -help Displays this help page` +``` From 45d6a27b0c79fc783fe2498f387ab3f0abf0fa1a Mon Sep 17 00:00:00 2001 From: it33 Date: Fri, 4 Dec 2015 16:37:23 -0800 Subject: [PATCH 3/3] Update Command-Line_Tools.md --- doc/install/Command-Line_Tools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/install/Command-Line_Tools.md b/doc/install/Command-Line_Tools.md index 05a1d480a9..ff6f110fd2 100644 --- a/doc/install/Command-Line_Tools.md +++ b/doc/install/Command-Line_Tools.md @@ -9,7 +9,7 @@ From the directory where the Mattermost platform is installed a `platform` comma - Permanently deleting users (use cautiously - database backup recommended before use) - Permanently deleting teams (use cautiously - database backup recommended before use) -Typing `mattermost -help` brings up the below documentation on usage. +Typing `platform -help` brings up the below documentation on usage. ``` Mattermost commands to help configure the system