From e92af1bc7fe5cd5860206061f4ff261b3339cc51 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 13 Jul 2017 08:40:47 -0400 Subject: SidePanel system, system status, crapton of other neat things --- ShiftOS_TheReturn/KernelWatchdog.cs | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'ShiftOS_TheReturn/KernelWatchdog.cs') 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) { -- cgit v1.2.3