projects
/
python_utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e024f55
)
Get rid of blacklist/whitelist; use blocklist/allowlist instead.
author
Scott Gasch
<
[email protected]
>
Fri, 6 Aug 2021 18:20:14 +0000
(11:20 -0700)
committer
Scott Gasch
<
[email protected]
>
Fri, 6 Aug 2021 18:20:14 +0000
(11:20 -0700)
acl.py
patch
|
blob
|
history
diff --git
a/acl.py
b/acl.py
index 91550901e07df0a614027f90a6d15fa803fde877..f810b418e635b1ca4dcbdc6df8f894764d92b8c8 100644
(file)
--- 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.
class AllowListACL(SetBasedACL):
"""Convenience subclass for a list that only allows known items.
- i.e. a '
white
list'
+ i.e. a '
allow
list'
"""
def __init__(self,
*,
"""
def __init__(self,
*,
@@
-119,7
+119,20
@@
class AllowListACL(SetBasedACL):
class DenyListACL(SetBasedACL):
"""Convenience subclass for a list that only disallows known items.
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,
*,
"""
def __init__(self,
*,