We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42d1347 commit 54208b6Copy full SHA for 54208b6
casbin/core_enforcer.py
@@ -14,6 +14,7 @@
14
15
import copy
16
import logging
17
+import re
18
19
from casbin.effect import Effector, get_effector, effect_to_bool
20
from casbin.model import Model, FunctionMap
@@ -539,6 +540,6 @@ def configure_logging(logging_config=None):
539
540
def _get_expression(expr, functions=None):
541
expr = expr.replace("&&", "and")
542
expr = expr.replace("||", "or")
- expr = expr.replace("!", "not")
543
+ expr = re.sub(r"!(?!=)", "not ", expr)
544
545
return SimpleEval(expr, functions)
0 commit comments