X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=acl.py;h=f810b418e635b1ca4dcbdc6df8f894764d92b8c8;hb=29ee1f98654a689e9cab76b0c7c68428faa43a8c;hp=91550901e07df0a614027f90a6d15fa803fde877;hpb=a838c154135b2420d9047a101caf24a2c9f593c2;p=python_utils.git diff --git a/acl.py b/acl.py index 9155090..f810b41 100644 --- a/acl.py +++ b/acl.py @@ -106,7 +106,7 @@ class SetBasedACL(SimpleACL): class AllowListACL(SetBasedACL): """Convenience subclass for a list that only allows known items. - i.e. a 'whitelist' + i.e. a 'allowlist' """ def __init__(self, *, @@ -119,7 +119,20 @@ class AllowListACL(SetBasedACL): class DenyListACL(SetBasedACL): """Convenience subclass for a list that only disallows known items. - i.e. a 'blacklist' + i.e. a 'blocklist' + """ + def __init__(self, + *, + deny_set: Optional[Set[Any]]) -> None: + super().__init__( + deny_set = deny_set, + order_to_check_allow_deny = Order.ALLOW_DENY, + default_answer = True) + + +class BlockListACL(SetBasedACL): + """Convenience subclass for a list that only disallows known items. + i.e. a 'blocklist' """ def __init__(self, *,