Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ introduce folder full search #6703

Merged
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,11 @@ def as_postgres_sql_query_str(statement) -> str:
dialect=postgresql.dialect(), # type: ignore[misc]
)
return f"{compiled}"


def assemble_array_groups(user_group_ids: list[int]) -> str:
matusdrobuliak66 marked this conversation as resolved.
Show resolved Hide resolved
return (
"array[]::text[]"
if len(user_group_ids) == 0
else f"""array[{', '.join(f"'{group_id}'" for group_id in user_group_ids)}]"""
)
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
workspaces_access_rights,
)
from simcore_postgres_database.storage_models import file_meta_data, user_to_groups
from simcore_postgres_database.utils import assemble_array_groups

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -117,14 +118,6 @@ def _aggregate_access_rights(
return AccessRights.none()


def assemble_array_groups(user_group_ids: list[GroupID]) -> str:
return (
"array[]::text[]"
if len(user_group_ids) == 0
else f"""array[{', '.join(f"'{group_id}'" for group_id in user_group_ids)}]"""
)


access_rights_subquery = (
sa.select(
project_to_groups.c.project_uuid,
Expand Down
Loading