Add test for Public role permissions. (#13965)

In #13923, all permissions were removed from the Public role. This adds a test to ensure that the default public role doesn't have any permissions.

related: #13923
(cherry picked from commit a52e77d0b4)
This commit is contained in:
James Timmins 2021-01-29 10:28:22 -08:00 коммит произвёл Kaxil Naik
Родитель 9650992355
Коммит 6d2db67436
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -169,6 +169,12 @@ class TestSecurity(unittest.TestCase):
assert role_perms_len == new_role_perms_len
def test_verify_public_role_has_no_permissions(self):
with self.app.app_context():
public = self.appbuilder.sm.find_role("Public")
assert public.permissions == []
def test_get_user_roles(self):
user = mock.MagicMock()
user.is_anonymous = False