Skip to content

Commit

Permalink
test: current_user part of g?
Browse files Browse the repository at this point in the history
  • Loading branch information
nickumia-reisys committed Sep 28, 2023
1 parent f841f8b commit 53ca958
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ckanext/saml2auth/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
from ckan.common import g, current_user
from ckan.common import g
import ckan.lib.base as base

from ckanext.saml2auth.views.saml2auth import saml2auth
Expand Down Expand Up @@ -97,12 +97,12 @@ def update_config(self, config_):

def identify(self):
if (
current_user.is_authenticated and
current_user.is_active and
g.current_user.is_authenticated and
g.current_user.is_active and
not session.get('last_active')
):
log.info('User {0}<{1}> logged in successfully{2}.'.format(
current_user.name, current_user.email,
g.current_user.name, g.current_user.email,
' via saml' if session.get('_saml_session_info') else ''
))

Expand Down

0 comments on commit 53ca958

Please sign in to comment.