mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
fix: reorganize role permissions (#23096)
(cherry picked from commit d4362a3676)
This commit is contained in:
committed by
Joe Li
parent
4b03d2553c
commit
7a4cd44a5d
@@ -202,6 +202,10 @@ class TestQueryApi(SupersetTestCase):
|
||||
gamma2 = self.create_user(
|
||||
"gamma_2", "password", "Gamma", email="gamma2@superset.org"
|
||||
)
|
||||
# Add SQLLab role to these gamma users, so they have access to queries
|
||||
sqllab_role = self.get_role("sql_lab")
|
||||
gamma1.roles.append(sqllab_role)
|
||||
gamma2.roles.append(sqllab_role)
|
||||
|
||||
gamma1_client_id = self.get_random_string()
|
||||
gamma2_client_id = self.get_random_string()
|
||||
@@ -383,7 +387,7 @@ class TestQueryApi(SupersetTestCase):
|
||||
sql="SELECT col1, col2 from table1",
|
||||
)
|
||||
|
||||
self.login(username="gamma")
|
||||
self.login(username="gamma_sqllab")
|
||||
arguments = {"filters": [{"col": "sql", "opr": "sw", "value": "SELECT col1"}]}
|
||||
uri = f"api/v1/query/?q={prison.dumps(arguments)}"
|
||||
rv = self.client.get(uri)
|
||||
|
||||
Reference in New Issue
Block a user