mirror of
https://github.com/apache/superset.git
synced 2026-04-18 07:35:09 +00:00
feat(List Roles): Migrate FAB view to React (#32432)
Co-authored-by: Diego Pucci <diegopucci.me@gmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user