diff options
| author | Scott Gasch <[email protected]> | 2021-08-06 11:20:14 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2021-08-06 11:20:14 -0700 |
| commit | 8c3fdf110f513719aa31d20c6f837f29c72abb43 (patch) | |
| tree | 6157f867904604dd2281b927ddcf7ee7c83f5422 /acl.py | |
| parent | e024f55a3d5b652d0745b6978a28c83f62711e59 (diff) | |
Get rid of blacklist/whitelist; use blocklist/allowlist instead.
Diffstat (limited to 'acl.py')
| -rw-r--r-- | acl.py | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -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, *, |
