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

Function preprocess_username

web/pgadmin/utils/paths.py:23–32  ·  view source on GitHub ↗
(un)

Source from the content-addressed store, hash-verified

21
22
23def preprocess_username(un):
24 ret_un = un
25 if len(ret_un) == 0 or ret_un[0].isdigit():
26 ret_un = 'pga_user_' + un
27
28 ret_un = ret_un.replace('@', '_') \
29 .replace('/', 'slash') \
30 .replace('\\', 'slash')
31
32 return ret_un
33
34
35def get_storage_directory(user=current_user, shared_storage=''):

Callers 3

_get_user_storage_dirsFunction · 0.90
get_storage_directoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected