MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / get_user_server_query

Function get_user_server_query

web/pgadmin/utils/server_access.py:122–138  ·  view source on GitHub ↗

Return a base query for servers accessible to the current user. Includes owned servers + shared servers (visible to all users). The Administrator role does not grant visibility into other users' private servers.

()

Source from the content-addressed store, hash-verified

120
121
122def get_user_server_query():
123 """Return a base query for servers accessible to the current user.
124
125 Includes owned servers + shared servers (visible to all users).
126
127 The Administrator role does not grant visibility into other
128 users' private servers.
129 """
130 if not config.SERVER_MODE:
131 return Server.query
132
133 return Server.query.filter(
134 or_(
135 Server.user_id == current_user.id,
136 Server.shared
137 )
138 )

Callers 7

get_nodesMethod · 0.90
nodesMethod · 0.90
listMethod · 0.90
serversFunction · 0.90
get_new_connection_dataFunction · 0.90

Calls 1

filterMethod · 0.80

Tested by

no test coverage detected