public void Unrestricted() { SiteIdentityPermissionAttribute a = new SiteIdentityPermissionAttribute(SecurityAction.Assert); a.Unrestricted = true; IPermission perm = a.CreatePermission(); }
public void DefaultPermission() { SiteIdentityPermissionAttribute a = new SiteIdentityPermissionAttribute(SecurityAction.Assert); Assert.IsNull(a.Site, "Site"); // SiteIdentityPermission would throw a ArgumentException for a null site ... SiteIdentityPermission perm = (SiteIdentityPermission)a.CreatePermission(); // ... but this works ... Assert.IsNotNull(perm, "CreatePermission(null site)"); // ... but this doesn't! (FIXED IN 2.0 NOV CTP) string site = perm.Site; }
public static void SiteIdentityPermissionAttributeCallMethods() { SiteIdentityPermissionAttribute sipa = new SiteIdentityPermissionAttribute(new Permissions.SecurityAction()); IPermission ip = sipa.CreatePermission(); }