File tree Expand file tree Collapse file tree 4 files changed +485
-379
lines changed
packages/postgres-database/src/simcore_postgres_database
storage/src/simcore_service_storage
web/server/src/simcore_service_webserver/folders Expand file tree Collapse file tree 4 files changed +485
-379
lines changed Original file line number Diff line number Diff line change @@ -81,3 +81,11 @@ def as_postgres_sql_query_str(statement) -> str:
8181 dialect = postgresql .dialect (), # type: ignore[misc]
8282 )
8383 return f"{ compiled } "
84+
85+
86+ def assemble_array_groups (user_group_ids : list [int ]) -> str :
87+ return (
88+ "array[]::text[]"
89+ if len (user_group_ids ) == 0
90+ else f"""array[{ ', ' .join (f"'{ group_id } '" for group_id in user_group_ids )} ]"""
91+ )
Original file line number Diff line number Diff line change 5151 workspaces_access_rights ,
5252)
5353from simcore_postgres_database .storage_models import file_meta_data , user_to_groups
54+ from simcore_postgres_database .utils import assemble_array_groups
5455
5556logger = logging .getLogger (__name__ )
5657
@@ -117,14 +118,6 @@ def _aggregate_access_rights(
117118 return AccessRights .none ()
118119
119120
120- def assemble_array_groups (user_group_ids : list [GroupID ]) -> str :
121- return (
122- "array[]::text[]"
123- if len (user_group_ids ) == 0
124- else f"""array[{ ', ' .join (f"'{ group_id } '" for group_id in user_group_ids )} ]"""
125- )
126-
127-
128121access_rights_subquery = (
129122 sa .select (
130123 project_to_groups .c .project_uuid ,
You can’t perform that action at this time.
0 commit comments