public void DemandVerifyAsHeldFailueTest() { SetPermissions(new MBeanPermission("NetMX.StandardMBean, NetMX", "getMBeanInfo", new ObjectName("Sample:"), MBeanPermissionAction.Invoke)); MBeanPermission perm = new MBeanPermission("", "getMBeanInfo", new ObjectName("Sample:"), MBeanPermissionAction.Invoke); perm.Demand(); }
private static void TestPermissions(string className, string memberName, ObjectName name, MBeanPermissionAction action) { MBeanCASPermission casPerm = new MBeanCASPermission(className, memberName, name, action); casPerm.Demand(); MBeanPermission perm = new MBeanPermission(className, memberName, name, action); perm.Demand(); }
public void DemandTest() { SetPermissions(new MBeanPermission("NetMX.StandardMBean, NetMX", "getMBeanInfo", new ObjectName("Sample:"), MBeanPermissionAction.Invoke)); MBeanPermission perm = new MBeanPermission("NetMX.StandardMBean, NetMX", "getMBeanInfo", new ObjectName("Sample:"), MBeanPermissionAction.Invoke); perm.Demand(); perm = new MBeanPermission(null, "getMBeanInfo", new ObjectName("Sample:"), MBeanPermissionAction.Invoke); perm.Demand(); perm = new MBeanPermission("NetMX.StandardMBean, NetMX", null, new ObjectName("Sample:"), MBeanPermissionAction.Invoke); perm.Demand(); perm = new MBeanPermission("NetMX.StandardMBean, NetMX", "getMBeanInfo", null, MBeanPermissionAction.Invoke); perm.Demand(); }