13 lines
315 B
Diff
13 lines
315 B
Diff
|
|
diff --git a/policy.py b/policy.py
|
||
|
|
--- a/policy.py
|
||
|
|
+++ b/policy.py
|
||
|
|
@@ -5,6 +5,8 @@ class Policy:
|
||
|
|
|
||
|
|
def set_flag(self, name, enabled):
|
||
|
|
self.flags[name] = bool(enabled)
|
||
|
|
+ if enabled:
|
||
|
|
+ self._decision_cache.clear()
|
||
|
|
|
||
|
|
def allows(self, user_id, flag):
|
||
|
|
key = (user_id, flag)
|