MCPcopy
hub / github.com/diffgram/diffgram / getUserID

Function getUserID

shared/helpers/permissions.py:181–189  ·  view source on GitHub ↗
(session)

Source from the content-addressed store, hash-verified

179
180
181def getUserID(session):
182 if settings.USE_OAUTH2:
183 return get_user_from_oauth2(session = session)
184 else:
185 if login_session.get('user_id', None) is not None:
186 out = hashing_functions.check_secure_val(login_session['user_id'])
187 if out is not None:
188 return out
189 return None
190
191
192def defaultRedirect():

Callers 14

label_editFunction · 0.90
user_editFunction · 0.90
by_task_id_coreMethod · 0.90
innerMethod · 0.90
innerMethod · 0.90
check_permissionsMethod · 0.90
permissionsMethod · 0.90
innerMethod · 0.90
get_current_userMethod · 0.90
getMethod · 0.90
remove_fileFunction · 0.85

Calls 2

get_user_from_oauth2Function · 0.85
getMethod · 0.45

Tested by

no test coverage detected