diff --git a/cas_server/default_settings.py b/cas_server/default_settings.py index 737bb84..3cda3e3 100644 --- a/cas_server/default_settings.py +++ b/cas_server/default_settings.py @@ -185,6 +185,8 @@ CAS_NEW_VERSION_EMAIL_WARNING = True #: You should not change it. CAS_NEW_VERSION_JSON_URL = "https://pypi.python.org/pypi/django-cas-server/json" +#: If the service message should be displayed on the login page +CAS_SHOW_SERVICE_MESSAGES = True #: Messages displayed in a info-box on the html pages of the default templates. #: ``CAS_INFO_MESSAGES`` is a :class:`dict` mapping message name to a message :class:`dict`. diff --git a/cas_server/tests/test_view.py b/cas_server/tests/test_view.py index 3320968..016db3e 100644 --- a/cas_server/tests/test_view.py +++ b/cas_server/tests/test_view.py @@ -295,7 +295,7 @@ class LoginTestCase(TestCase, BaseServicePattern, CanLogin): ) in response.content ) - @override_settings(CAS_SHOW_SERVER_MESSAGES=False) + @override_settings(CAS_SHOW_SERVICE_MESSAGES=False) def test_view_login_get_allowed_service_no_message(self): """Request a ticket for an allowed service by an unauthenticated client""" # get a bare new http client @@ -324,7 +324,7 @@ class LoginTestCase(TestCase, BaseServicePattern, CanLogin): # we warn the user that https://www.example.net is not an allowed service url self.assertTrue(b"Service https://www.example.net not allowed" in response.content) - @override_settings(CAS_SHOW_SERVER_MESSAGES=False) + @override_settings(CAS_SHOW_SERVICE_MESSAGES=False) def test_view_login_get_denied_service_no_message(self): """Request a ticket for an denied service by an unauthenticated client""" # get a bare new http client @@ -535,7 +535,7 @@ class LoginTestCase(TestCase, BaseServicePattern, CanLogin): # renewing authentication is done in the validate and serviceValidate views tests self.assertEqual(ticket.renew, True) - @override_settings(CAS_SHOW_SERVER_MESSAGES=False) + @override_settings(CAS_SHOW_SERVICE_MESSAGES=False) def test_renew_message_disabled(self): """test the authentication renewal request from a service""" # use the default test service