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()); }
public slevel(subcap s, char c) { if (c == 'C') clas = s.retclasc(); if (c == 'M' || c == 'S') clas = s.retclasm(); comp = s.retcomp(); }
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); }
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()); } }
public slevel(subcap s, char c) { if (c == 'C') { clas = s.retclasc(); } if (c == 'M' || c == 'S') { clas = s.retclasm(); } comp = s.retcomp(); }
public accesstate(subcap s, objc o, List <subcap.acces> a) { sb = s; ob = o; ac = a; }
public accesstate(subcap s, objc o, List<subcap.acces> a) { sb = s; ob = o; ac = a; }
public void addsbj(subcap s) { sbj.Add(s); sbj[sbj.Count - 1].initobj(obj.Count); }
public void addperm(subcap sb, objc ob, subcap.acces dr) { sbj.Find(it => it == sb).addcapI(obj.IndexOf(ob), dr); }
public void addperm(string sb, string ob, subcap.acces dr) { sbj[sbjindex(sb)].addcapI(objindex(ob), dr); }
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); }
public void setperm(subcap sb, objc ob, List<subcap.acces> ac) { sbj.Find(it => it == sb).setcapI(obj.IndexOf(ob), ac); }
public void setperm(string sb, string ob, subcap.acces dr) { List<subcap.acces> ac = new List<subcap.acces>(); ac.Add(dr); sbj[sbjindex(sb)].setcapI(objindex(ob), ac); }
public List<subcap.acces> retperm(subcap sb, objc ob) { return sbj.Find(it => it == sb).retcapI(obj.IndexOf(ob)); }
public void remsbj(subcap s) { sbj.Remove(s); }