From a52e77d0b41edd775d962111d419b1d2a44f5c2d Mon Sep 17 00:00:00 2001 From: James Timmins Date: Fri, 29 Jan 2021 10:28:22 -0800 Subject: [PATCH] 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 --- tests/www/test_security.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/www/test_security.py b/tests/www/test_security.py index 27b0aba68b..d527e3a902 100644 --- a/tests/www/test_security.py +++ b/tests/www/test_security.py @@ -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