Script for automating a large assortment of AME related actions
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
782 B

using System;
using System.Threading;
namespace amecs.Actions
{
public class Elevation
{
public static bool Elevate() => amecs.RunBasicAction("Elevating user to Administrator", "The current user is now an Administrator", new Action(() =>
{
Globals.Administrators.Members.Add(Globals.User);
Globals.Administrators.Save();
Thread.Sleep(1000);
}), true);
public static bool DeElevate() => amecs.RunBasicAction("Revoking Admin rights from the current user", "Admin rights have been revoked for the current user", new Action(() =>
{
Globals.Administrators.Members.Remove(Globals.User);
Globals.Administrators.Save();
Thread.Sleep(1000);
}), true);
}
}