MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / inner

Function inner

web/pgadmin/authenticate/mfa/utils.py:294–319  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

292 @wraps(wrapped)
293 @login_required
294 def inner(*args, **kwargs):
295 def execute_func():
296 session['mfa_authenticated'] = True
297 return wrapped(*args, **kwargs)
298
299 def if_else_func(_func, first, second):
300 def if_else_func_inner():
301 return _func(first, second)
302 return if_else_func_inner
303
304 return mfa_enabled(
305 if_else_func(
306 mfa_session_authenticated,
307 execute_func,
308 if_else_func(
309 mfa_user_registered,
310 redirect_to_mfa_validate_url,
311 if_else_func(
312 mfa_user_force_registration_required,
313 redirect_to_mfa_registration,
314 execute_func
315 )
316 )
317 ),
318 execute_func
319 )
320
321 return inner
322

Callers

nothing calls this directly

Calls 2

mfa_enabledFunction · 0.85
if_else_funcFunction · 0.85

Tested by

no test coverage detected