aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn/KernelWatchdog.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-07-13 08:40:47 -0400
committerMichael <[email protected]>2017-07-13 08:40:47 -0400
commite92af1bc7fe5cd5860206061f4ff261b3339cc51 (patch)
tree14b571e2495731d7302b61c56d18ae5e4988587e /ShiftOS_TheReturn/KernelWatchdog.cs
parentaf01804c0fb4286f5975e973aec2b4eaf9752c08 (diff)
downloadshiftos_thereturn-e92af1bc7fe5cd5860206061f4ff261b3339cc51.tar.gz
shiftos_thereturn-e92af1bc7fe5cd5860206061f4ff261b3339cc51.tar.bz2
shiftos_thereturn-e92af1bc7fe5cd5860206061f4ff261b3339cc51.zip
SidePanel system, system status, crapton of other neat things
Diffstat (limited to 'ShiftOS_TheReturn/KernelWatchdog.cs')
-rw-r--r--ShiftOS_TheReturn/KernelWatchdog.cs28
1 files changed, 0 insertions, 28 deletions
diff --git a/ShiftOS_TheReturn/KernelWatchdog.cs b/ShiftOS_TheReturn/KernelWatchdog.cs
index 0608c46..ec4ee45 100644
--- a/ShiftOS_TheReturn/KernelWatchdog.cs
+++ b/ShiftOS_TheReturn/KernelWatchdog.cs
@@ -66,38 +66,10 @@ namespace ShiftOS.Engine
}
}
- public static bool IsSafe(TerminalBackend.TerminalCommand cmd)
- {
- if (!cmd.RequiresElevation)
- return true;
- else
- {
- if (SaveSystem.CurrentUser.Permissions == Objects.UserPermissions.Root)
- return true;
- else
- return false;
- }
- }
-
static string regularUsername = ""; //put regular username in here later
- public static void EnterKernelMode()
- {
- regularUsername = SaveSystem.CurrentUser.Username; // k for now put user's username in here for the time being
- SaveSystem.CurrentUser = SaveSystem.Users.FirstOrDefault(x => x.Username == "root"); // now their username is root
-
- }
-
- public static void LeaveKernelMode()
- {
- var user = SaveSystem.Users.FirstOrDefault(x => x.Username == regularUsername); //finds username
- if (user == null)
- throw new Exception("User not in root mode."); // fuck this means the user isnt root quick throw error
- SaveSystem.CurrentUser = user;
- }
-
//determines if you can disconnect from mud if there are no applications that currently need to
internal static bool CanRunOffline(Type method)
{