mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-01-22 18:02:16 +00:00
document user management
This commit is contained in:
parent
1b4e4bfd30
commit
8c7e638d6d
2 changed files with 37 additions and 1 deletions
|
@ -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" />
|
||||
|
|
|
@ -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")]
|
||||
|
|
Loading…
Reference in a new issue