Ejemplo n.º 1
0
        public void IsHierarchyGrantedEnum1()
        {
            var acl = new ReadWriteAccessControlList();

            acl.Grant("principal1", Operation.Write, "r1");
            Assert.True(acl.IsHierarchyGranted("principal1", Operation.Write, "r1.r2.r3.r4"));
        }
Ejemplo n.º 2
0
        public void IsHierarchyGranted2()
        {
            var acl = new ReadWriteAccessControlList();

            acl.Grant("principal1", "operation1", "r1");
            acl.Deny("principal1", "operation1", "r1.r2");
            Assert.False(acl.IsHierarchyGranted("principal1", "operation1", "r1.r2.r3"));
        }