diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ab149b6..bfdccc9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -16,6 +16,7 @@ Added Fixed ----- * Allow both unicode and bytes dotted string in utils.import_attr +* Fix some spelling and grammar on log messages. (thanks to Allie Micka) v0.7.4 - 2016-09-07 diff --git a/cas_server/auth.py b/cas_server/auth.py index aa07593..fbd199e 100644 --- a/cas_server/auth.py +++ b/cas_server/auth.py @@ -49,7 +49,7 @@ class AuthUser(object): def test_password(self, password): """ - Tests ``password`` agains the user password. + Tests ``password`` against the user-supplied password. :raises NotImplementedError: always. The method need to be implemented by subclasses """ @@ -74,7 +74,7 @@ class DummyAuthUser(AuthUser): # pragma: no cover def test_password(self, password): """ - Tests ``password`` agains the user password. + Tests ``password`` against the user-supplied password. :param unicode password: a clear text password as submited by the user. :return: always ``False`` @@ -102,7 +102,7 @@ class TestAuthUser(AuthUser): def test_password(self, password): """ - Tests ``password`` agains the user password. + Tests ``password`` against the user-supplied password. :param unicode password: a clear text password as submited by the user. :return: ``True`` if :attr:`username` is valid and @@ -149,7 +149,7 @@ class MysqlAuthUser(DBAuthUser): # pragma: no cover """ DEPRECATED, use :class:`SqlAuthUser` instead. - A mysql authentication class: authenticate user agains a mysql database + A mysql authentication class: authenticate user against a mysql database :param unicode username: A username, stored in the :attr:`username` class attribute. Valid value are fetched from the MySQL database set with @@ -188,7 +188,7 @@ class MysqlAuthUser(DBAuthUser): # pragma: no cover def test_password(self, password): """ - Tests ``password`` agains the user password. + Tests ``password`` against the user-supplied password. :param unicode password: a clear text password as submited by the user. :return: ``True`` if :attr:`username` is valid and ``password`` is @@ -208,7 +208,7 @@ class MysqlAuthUser(DBAuthUser): # pragma: no cover class SqlAuthUser(DBAuthUser): # pragma: no cover """ - A SQL authentication class: authenticate user agains a SQL database. The SQL database + A SQL authentication class: authenticate user against a SQL database. The SQL database must be configures in settings.py as ``settings.DATABASES['cas_server']``. :param unicode username: A username, stored in the :attr:`username` @@ -238,7 +238,7 @@ class SqlAuthUser(DBAuthUser): # pragma: no cover def test_password(self, password): """ - Tests ``password`` agains the user password. + Tests ``password`` against the user-supplied password. :param unicode password: a clear text password as submited by the user. :return: ``True`` if :attr:`username` is valid and ``password`` is @@ -308,7 +308,7 @@ class LdapAuthUser(DBAuthUser): # pragma: no cover def test_password(self, password): """ - Tests ``password`` agains the user password. + Tests ``password`` against the user-supplied password. :param unicode password: a clear text password as submited by the user. :return: ``True`` if :attr:`username` is valid and ``password`` is @@ -347,7 +347,7 @@ class DjangoAuthUser(AuthUser): # pragma: no cover def test_password(self, password): """ - Tests ``password`` agains the user password. + Tests ``password`` against the user-supplied password. :param unicode password: a clear text password as submited by the user. :return: ``True`` if :attr:`user` is valid and ``password`` is @@ -426,7 +426,7 @@ class CASFederateAuth(AuthUser): def test_password(self, ticket): """ - Tests ``password`` agains the user password. + Tests ``password`` against the user-supplied password. :param unicode password: The CAS tickets just used to validate the user authentication against its CAS backend. diff --git a/cas_server/federate.py b/cas_server/federate.py index d977771..4ad05e1 100644 --- a/cas_server/federate.py +++ b/cas_server/federate.py @@ -69,7 +69,7 @@ class CASFederateValidateUser(object): def verify_ticket(self, ticket): """ - test ``ticket`` agains the CAS provider, if valid, create a + test ``ticket`` against the CAS provider, if valid, create a :class:`FederatedUser` matching provider returned username and attributes. diff --git a/cas_server/models.py b/cas_server/models.py index d13f553..7a421a5 100644 --- a/cas_server/models.py +++ b/cas_server/models.py @@ -433,7 +433,7 @@ class ServicePattern(models.Model): """ Bases: :class:`django.db.models.Model` - Allowed services pattern agains services are tested to + Allowed services pattern against services are tested to """ class Meta: ordering = ("pos", ) diff --git a/cas_server/tests/test_view.py b/cas_server/tests/test_view.py index 22b3bd7..c1ffe01 100644 --- a/cas_server/tests/test_view.py +++ b/cas_server/tests/test_view.py @@ -825,7 +825,7 @@ class LogoutTestCase(TestCase): @override_settings(CAS_ENABLE_AJAX_AUTH=True) def test_ajax_logout(self): """ - test ajax logout. These methode are here, but I do not really see an use case for + test ajax logout. These methods are here, but I do not really see an use case for javascript logout """ # get a client that is authenticated @@ -1728,7 +1728,7 @@ class ProxyTestCase(TestCase, BaseServicePattern, XmlContent): self.assert_error( response, "UNAUTHORIZED_SERVICE", - 'the service %s do not allow proxy ticket' % params['service'] + 'the service %s does not allow proxy tickets' % params['service'] ) self.service_pattern.proxy = True @@ -1974,7 +1974,7 @@ class SamlValidateTestCase(TestCase, BaseServicePattern, XmlContent): self.assert_error( response, "AuthnFailed", - 'TARGET %s do not match ticket service' % bad_target + 'TARGET %s does not match ticket service' % bad_target ) def test_saml_bad_xml(self): diff --git a/cas_server/views.py b/cas_server/views.py index 9f8c83c..c14e19f 100644 --- a/cas_server/views.py +++ b/cas_server/views.py @@ -191,7 +191,7 @@ class LogoutView(View, LogoutMixin): "

Logout successful

" "You have successfully logged out from %s sessions of the Central " "Authentication Service. " - "For security reasons, exit your web browser." + "For security reasons, close your web browser." ) % session_nb else: logout_msg = _( @@ -229,7 +229,7 @@ class LogoutView(View, LogoutMixin): class FederateAuth(CsrfExemptView): """ - view to authenticated user agains a backend CAS then CAS_FEDERATE is True + view to authenticated user against a backend CAS then CAS_FEDERATE is True csrf is disabled for allowing SLO requests reception. """ @@ -801,7 +801,7 @@ class LoginView(View, LogoutMixin): else: return utils.redirect_params("cas_server:login", params=self.request.GET) - # if login agains a service + # if login against a service if self.service: return self.service_login() # else display the logged template