aboutsummaryrefslogtreecommitdiffstats
path: root/src/py/imc/auth.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/py/imc/auth.py')
-rw-r--r--src/py/imc/auth.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/py/imc/auth.py b/src/py/imc/auth.py
index 2b06ac4..02dd2dc 100644
--- a/src/py/imc/auth.py
+++ b/src/py/imc/auth.py
@@ -34,12 +34,17 @@ class Auth:
return idendesc
@staticmethod
- def change_current_iden(idendesc):
+ def change_current_iden(idendesc,auth = None):
@contextlib.contextmanager
def context():
global current_idendata
- iden = Auth.instance.get_iden(idendesc)
+ auth = None
+
+ if auth == None:
+ auth = Auth.instance
+
+ iden = auth.get_iden(idendesc)
if iden == None:
raise ValueError('Illegal idendesc')