예제 #1
0
 public void addobj(string s)
 {
     objc o = new objc(s);
     obj.Add(o);
     foreach (var it in sbj)
         it.initobj(1);
 }
예제 #2
0
 public void testWrite(subcap sb, objc ob)
 {
     if ((new accesstate(sb, ob, mat.retperm(sb, ob)).canWrite(mat)) == false)
         Console.WriteLine("NO, SUBJECT {0} CANNOT PERFORM WRITE ON {1}", sb.retn(), ob.retn());
     else
         Console.WriteLine("YES, SUBJECT {0} CAN PERFORM WRITE ON {1}", sb.retn(), ob.retn());
 }
예제 #3
0
 public void addperm(subcap sb, objc ob, char c)
 {
     if (c == 'W')
         addperm(sb, ob, subcap.acces.write);
     if (c == 'A')
         addperm(sb, ob, subcap.acces.append);
     if (c == 'R')
         addperm(sb, ob, subcap.acces.read);
     if (c == 'E')
         addperm(sb, ob, subcap.acces.exec);
 }
예제 #4
0
 public void testExec(subcap sb, objc ob)
 {
     if ((new accesstate(sb, ob, mat.retperm(sb, ob)).canExec(mat)) == false)
     {
         Console.WriteLine("NO, SUBJECT {0} CANNOT PERFORM EXECUTE ON {1}", sb.retn(), ob.retn());
     }
     else
     {
         Console.WriteLine("YES, SUBJECT {0} CAN PERFORM EXECUTE ON {1}", sb.retn(), ob.retn());
     }
 }
예제 #5
0
 public accesstate(subcap s, objc o, List <subcap.acces> a)
 {
     sb = s;
     ob = o;
     ac = a;
 }
예제 #6
0
        public slevel(objc o)
        {
            clas = o.retclas();

            comp = o.retcomp();
        }
예제 #7
0
 public accesstate(subcap s, objc o, List<subcap.acces> a)
 {
     sb = s;
     ob = o;
     ac = a;
 }
예제 #8
0
 public void addperm(subcap sb, objc ob, subcap.acces dr)
 {
     sbj.Find(it => it == sb).addcapI(obj.IndexOf(ob), dr);
 }
예제 #9
0
 public void addobj(objc o)
 {
     obj.Add(o);
     foreach (var it in sbj)
         it.initobj(1);
 }
예제 #10
0
 public void setperm(subcap sb, objc ob, subcap.acces dr)
 {
     List<subcap.acces> ac = new List<subcap.acces>();
     ac.Add(dr);
     sbj.Find(it => it == sb).setcapI(obj.IndexOf(ob), ac);
 }
예제 #11
0
 public void setperm(subcap sb, objc ob, List<subcap.acces> ac)
 {
     sbj.Find(it => it == sb).setcapI(obj.IndexOf(ob), ac);
 }
예제 #12
0
 public List<subcap.acces> retperm(subcap sb, objc ob)
 {
     return sbj.Find(it => it == sb).retcapI(obj.IndexOf(ob));
 }
예제 #13
0
 public void remobj(objc o)
 {
     int x = obj.IndexOf(o);
     obj.Remove(o);
     foreach (var it in sbj)
         it.remob(x);
 }
예제 #14
0
        public slevel(objc o)
        {
            clas = o.retclas();

            comp = o.retcomp();
        }