feat: RLS for SQL Lab (#19999)

* feat: RLS for SQL Lab

* Small fixes

* Pass username to security manager

* Update docstrings

* Add tests

* Remove type from docstring
This commit is contained in:
Beto Dealmeida
2022-05-12 11:03:01 -07:00
committed by GitHub
parent ded9122ceb
commit f2881e5bbd
8 changed files with 329 additions and 66 deletions

View File

@@ -1406,7 +1406,10 @@ def test_insert_rls(
# pylint: disable=unused-argument
def get_rls_for_table(
candidate: Token, database_id: int, default_schema: str
candidate: Token,
database_id: int,
default_schema: str,
username: Optional[str] = None,
) -> Optional[TokenList]:
"""
Return the RLS ``condition`` if ``candidate`` matches ``table``.