def get_aces_except_for(self, principals): a = acelist for ace in self.get_aces(): trusted = 0 for p in principals: #print "comparing %s with %s" % (p.get_sid(), ace.get_sid()) if p.get_sid() == ace.get_sid(): trusted = 1 break if not trusted: a.add(ace) return a
def get_aces_for(self, principal): a = acelist() for ace in self.get_aces(): if principal.get_sid() == ace.get_sid(): a.add(ace) return a