aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-05-20 16:09:50 -0400
committerMichael <[email protected]>2017-05-20 16:09:50 -0400
commit8c7e638d6db4c6992b14f84cca65d7c65fee4263 (patch)
treebf755616ab21d2e066ebf57d9b496aaffdc1523e
parent1b4e4bfd301fd1dbeec2fe84095ee696766c29f7 (diff)
downloadshiftos_thereturn-8c7e638d6db4c6992b14f84cca65d7c65fee4263.tar.gz
shiftos_thereturn-8c7e638d6db4c6992b14f84cca65d7c65fee4263.tar.bz2
shiftos_thereturn-8c7e638d6db4c6992b14f84cca65d7c65fee4263.zip
document user management
-rw-r--r--ShiftOS_TheReturn/ShiftOS.Engine.csproj1
-rw-r--r--ShiftOS_TheReturn/UserManagementCommands.cs37
2 files changed, 37 insertions, 1 deletions
diff --git a/ShiftOS_TheReturn/ShiftOS.Engine.csproj b/ShiftOS_TheReturn/ShiftOS.Engine.csproj
index 3b5eadd..1b97853 100644
--- a/ShiftOS_TheReturn/ShiftOS.Engine.csproj
+++ b/ShiftOS_TheReturn/ShiftOS.Engine.csproj
@@ -133,7 +133,6 @@
<Compile Include="TerminalTextWriter.cs" />
<Compile Include="TutorialManager.cs" />
<Compile Include="UniteClient.cs" />
- <Compile Include="UniteTestCommands.cs" />
<Compile Include="UserManagementCommands.cs" />
<Compile Include="VirusEngine.cs" />
<Compile Include="WinOpenAttribute.cs" />
diff --git a/ShiftOS_TheReturn/UserManagementCommands.cs b/ShiftOS_TheReturn/UserManagementCommands.cs
index 5702e08..a64c99c 100644
--- a/ShiftOS_TheReturn/UserManagementCommands.cs
+++ b/ShiftOS_TheReturn/UserManagementCommands.cs
@@ -7,11 +7,19 @@ using ShiftOS.Objects;
namespace ShiftOS.Engine
{
+ /// <summary>
+ /// Administrative user management terminal commands.
+ /// </summary>
[Namespace("admin")]
[KernelMode]
[RequiresUpgrade("mud_fundamentals")]
public static class AdminUserManagementCommands
{
+ /// <summary>
+ /// Add a user to the system.
+ /// </summary>
+ /// <param name="args">Command arguments.</param>
+ /// <returns>Command result.</returns>
[Command("add", description = "Add a user to the system.", usage ="name:")]
[RequiresArgument("name")]
public static bool AddUser(Dictionary<string, object> args)
@@ -35,6 +43,12 @@ namespace ShiftOS.Engine
return true;
}
+ /// <summary>
+ /// Remove a user from the system.
+ /// </summary>
+ /// <param name="args">Command arguments.</param>
+ /// <returns>Command result.</returns>
+
[Command("remove", description = "Remove a user from the system.", usage = "name:")]
[RequiresArgument("name")]
public static bool RemoveUser(Dictionary<string, object> args)
@@ -60,6 +74,11 @@ namespace ShiftOS.Engine
+ /// <summary>
+ /// Set access control level for a user.
+ /// </summary>
+ /// <param name="args">Command arguments.</param>
+ /// <returns>Command result.</returns>
[Command("set_acl")]
[RequiresArgument("user")]
@@ -124,6 +143,11 @@ namespace ShiftOS.Engine
return true;
}
+ /// <summary>
+ /// List all users in the system.
+ /// </summary>
+ /// <param name="args">Command arguments.</param>
+ /// <returns>Command result.</returns>
[Command("users", description = "Get a list of all users on the system.")]
public static bool GetUsers()
@@ -146,10 +170,18 @@ namespace ShiftOS.Engine
}
}
+ /// <summary>
+ /// Non-administrative user management terminal commands.
+ /// </summary>
[Namespace("user")]
[RequiresUpgrade("mud_fundamentals")]
public static class UserManagementCommands
{
+ /// <summary>
+ /// Log in as another user.
+ /// </summary>
+ /// <param name="args">Command arguments.</param>
+ /// <returns>Command result.</returns>
[Command("login", description = "Log in as another user.")]
[RequiresArgument("user")]
[RequiresArgument("pass")]
@@ -176,6 +208,11 @@ namespace ShiftOS.Engine
return true;
}
+ /// <summary>
+ /// Set the password for the current user.
+ /// </summary>
+ /// <param name="args">Command arguments.</param>
+ /// <returns>Command result.</returns>
[Command("setpass", description ="Allows you to set your password to a new value.", usage ="old:,new:")]
[RequiresArgument("old")]
[RequiresArgument("new")]