(self, acl_public)
| 63 | return "" |
| 64 | |
| 65 | def setAclPublic(self, acl_public): |
| 66 | le = self.tree.find(".//LoggingEnabled") |
| 67 | if le is None: |
| 68 | raise ParameterError("Logging not enabled, can't set default ACL for logs") |
| 69 | tg = le.find(".//TargetGrants") |
| 70 | if not acl_public: |
| 71 | if not tg: |
| 72 | ## All good, it's not been there |
| 73 | return |
| 74 | else: |
| 75 | le.remove(tg) |
| 76 | else: # acl_public == True |
| 77 | anon_read = GranteeAnonRead().getElement() |
| 78 | if not tg: |
| 79 | tg = ET.SubElement(le, "TargetGrants") |
| 80 | ## What if TargetGrants already exists? We should check if |
| 81 | ## AnonRead is there before appending a new one. Later... |
| 82 | tg.append(anon_read) |
| 83 | |
| 84 | def isAclPublic(self): |
| 85 | raise NotImplementedError() |
no test coverage detected