using System; using System.Security.Permissions; class MainClass { [PrincipalPermission(SecurityAction.Demand, Name = @"MACHINE\Joe", Role = @"MACHINE\Managers")] public static void MyMethod() { } }