public void Unrestricted()
        {
            UrlIdentityPermissionAttribute a = new UrlIdentityPermissionAttribute(SecurityAction.Assert);

            a.Unrestricted = true;
            IPermission perm = a.CreatePermission();
        }
Beispiel #2
0
        public void DefaultPermission()
        {
            UrlIdentityPermissionAttribute a = new UrlIdentityPermissionAttribute(SecurityAction.Assert);

            Assert.IsNull(a.Url, "Url");
            // UrlIdentityPermission would throw a ArgumentNullException for a null URL ...
            UrlIdentityPermission perm = (UrlIdentityPermission)a.CreatePermission();

            // ... but this works ...
            Assert.IsNotNull(perm, "CreatePermission(null url)");
            // ... but this doesn't!
            string url = perm.Url;

            Assert.AreEqual(String.Empty, url, "Url-2");
        }
Beispiel #3
0
 public static void UrlIdentityPermissionAttributeCallMethods()
 {
     UrlIdentityPermissionAttribute uipa = new UrlIdentityPermissionAttribute(new Permissions.SecurityAction());
     IPermission ip = uipa.CreatePermission();
 }
Beispiel #4
0
 public static void UrlIdentityPermissionAttributeCallMethods()
 {
     UrlIdentityPermissionAttribute uipa = new UrlIdentityPermissionAttribute(new Permissions.SecurityAction());
     IPermission ip = uipa.CreatePermission();
 }