diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa9fa7c..c7d2a8f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,7 @@ jobs: test: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python-version: [ '3.7', '3.8', '3.9'] ckan-version: ["2.9", "2.10"] diff --git a/ckanext/saml2auth/plugin.py b/ckanext/saml2auth/plugin.py index 53b8454..8e0ed57 100644 --- a/ckanext/saml2auth/plugin.py +++ b/ckanext/saml2auth/plugin.py @@ -108,6 +108,11 @@ def logout(self): # CKAN <= 2.9.x also sets auth_tkt cookie response.set_cookie('auth_tkt', domain=domain, expires=0) + if g.userobj: + log.info(u'User {0}<{1}> logged out successfully'.format(g.userobj.name, g.userobj.email)) + else: + log.info(u'No user was logged in!') + return response diff --git a/ckanext/saml2auth/views/saml2auth.py b/ckanext/saml2auth/views/saml2auth.py index d5fb2ed..36a6c0f 100644 --- a/ckanext/saml2auth/views/saml2auth.py +++ b/ckanext/saml2auth/views/saml2auth.py @@ -295,6 +295,8 @@ def _log_user_into_ckan(resp): user_id = g.userobj.name set_repoze_user(user_id, resp) + log.info(u'User {0}<{1}> logged in successfully'.format(g.userobj.name, g.userobj.email)) + def saml2login(): u'''Redirects the user to the