Allow Gamma and Alpha to access '/users/userinfo/' (#6936)

* Allow Gamma and Alpha to access '/users/userinfo/'

closes https://github.com/apache/incubator-superset/issues/4919

* Fix unit test

* Fix test
This commit is contained in:
Maxime Beauchemin
2019-04-22 11:23:54 -07:00
committed by GitHub
parent aa1d9ae303
commit 36a219da7f
3 changed files with 18 additions and 7 deletions

View File

@@ -76,6 +76,7 @@ class RolePermissionTests(SupersetTestCase):
self.assertIn(('can_slice', 'Superset'), perm_set)
self.assertIn(('can_explore', 'Superset'), perm_set)
self.assertIn(('can_explore_json', 'Superset'), perm_set)
self.assertIn(('can_userinfo', 'UserDBModelView'), perm_set)
def assert_can_alpha(self, perm_set):
self.assert_can_all('SqlMetricInlineView', perm_set)
@@ -231,6 +232,7 @@ class RolePermissionTests(SupersetTestCase):
self.assertIn(('can_fave_slices', 'Superset'), gamma_perm_set)
self.assertIn(('can_save_dash', 'Superset'), gamma_perm_set)
self.assertIn(('can_slice', 'Superset'), gamma_perm_set)
self.assertIn(('can_userinfo', 'UserDBModelView'), gamma_perm_set)
def test_views_are_secured(self):
"""Preventing the addition of unsecured views without has_access decorator"""