feat(List Roles): Migrate FAB view to React (#32432)

Co-authored-by: Diego Pucci <diegopucci.me@gmail.com>
This commit is contained in:
Enzo Martellucci
2025-04-02 13:06:17 +02:00
committed by GitHub
parent c83eda9551
commit 4f0020d0df
26 changed files with 1831 additions and 12 deletions

View File

@@ -219,6 +219,7 @@ class TestSecurityGuestTokenApiTokenValidator(SupersetTestCase):
class TestSecurityRolesApi(SupersetTestCase):
uri = "api/v1/security/roles/" # noqa: F541
show_uri = "api/v1/security/roles/search/"
@with_config({"FAB_ADD_SECURITY_API": True})
def test_get_security_roles_admin(self):
@@ -276,3 +277,19 @@ class TestSecurityRolesApi(SupersetTestCase):
content_type="application/json",
)
self.assert403(response)
def test_show_roles_admin(self):
"""
Security API: Admin should be able to show roles with permissions and users
"""
self.login(ADMIN_USERNAME)
response = self.client.get(self.show_uri)
self.assert200(response)
def test_show_roles_gamma(self):
"""
Security API: Gamma should not be able to show roles
"""
self.login(GAMMA_USERNAME)
response = self.client.get(self.show_uri)
self.assert403(response)