Allow authorizer callback to be cleared

This commit is contained in:
Charles Leifer 2021-08-04 14:10:22 -05:00
parent 6247967ad2
commit 18551b8707
2 changed files with 16 additions and 5 deletions

View file

@ -482,6 +482,11 @@ class AuthorizerTests(unittest.TestCase):
self.con.execute("select c2 from t1")
self.assertIn('prohibited', str(cm.exception))
def test_clear_authorizer(self):
self.con.set_authorizer(None)
self.con.execute('select * from t2')
self.con.execute('select c2 from t1')
class AuthorizerRaiseExceptionTests(AuthorizerTests):
@staticmethod
def authorizer_cb(action, arg1, arg2, dbname, source):