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

✨♻️ webserver: refactored groups plugin and new user privacy compliance #6917

Merged
merged 85 commits into from
Dec 10, 2024
Merged
Changes from 1 commit
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
3e09bb1
@sanderegg review: rename patch instead of update
pcrespov Dec 6, 2024
73c73f9
rename ids
pcrespov Dec 6, 2024
2a7af4e
exception handlers groups
pcrespov Dec 6, 2024
e370faf
models
pcrespov Dec 6, 2024
22f22db
mv to common
pcrespov Dec 6, 2024
17675c9
exception handlers
pcrespov Dec 6, 2024
2ba30f9
moving classifiers and users"
pcrespov Dec 6, 2024
252f033
one place for groups
pcrespov Dec 6, 2024
aaffcae
refactors db
pcrespov Dec 6, 2024
c80bb38
service layer
pcrespov Dec 6, 2024
8ba6d46
fixing tests
pcrespov Dec 6, 2024
d15657a
updates models
pcrespov Dec 6, 2024
8727e2a
common and db
pcrespov Dec 6, 2024
ab2c516
sio
pcrespov Dec 6, 2024
90ea82d
cleanup
pcrespov Dec 6, 2024
60f1d92
move user groups fixture to pytest_simcore and drop from integration …
pcrespov Dec 6, 2024
84674ec
rm dependency
pcrespov Dec 6, 2024
8714e20
factory
pcrespov Dec 6, 2024
7458cdf
api
pcrespov Dec 6, 2024
6529cce
nodes uses new inteface
pcrespov Dec 6, 2024
88a98ef
tests
pcrespov Dec 6, 2024
a67a576
fixes test_gc
pcrespov Dec 6, 2024
202e8dd
get_user_group
pcrespov Dec 6, 2024
ed55834
update_user_group
pcrespov Dec 6, 2024
beedae1
cleanup
pcrespov Dec 6, 2024
ae9bb7e
organizations
pcrespov Dec 6, 2024
1ef0c7b
cleanup
pcrespov Dec 6, 2024
853308c
minor
pcrespov Dec 8, 2024
155ee4e
list users in group
pcrespov Dec 8, 2024
90a2af7
crud on orgazniation members
pcrespov Dec 8, 2024
8c7f01b
db refactor
pcrespov Dec 9, 2024
efda082
inter-domain interface
pcrespov Dec 9, 2024
5507295
rm adapter
pcrespov Dec 9, 2024
2dd48d4
cleanup
pcrespov Dec 9, 2024
74c9fda
model conversion and fitures
pcrespov Dec 9, 2024
e402440
fixes circular imports
pcrespov Dec 9, 2024
cf83d59
tests passing
pcrespov Dec 9, 2024
7130f4b
tests groups 2 passing
pcrespov Dec 9, 2024
a25f05b
cleanup
pcrespov Dec 9, 2024
1243701
alternative user name
pcrespov Dec 9, 2024
5c8691d
crud operations
pcrespov Dec 9, 2024
5676c86
cleanup
pcrespov Dec 9, 2024
1948db3
cleanup tests
pcrespov Dec 9, 2024
ceb96ef
fixing tests
pcrespov Dec 9, 2024
36418d5
pre
pcrespov Dec 9, 2024
f2a44a5
rm callable fixture
pcrespov Dec 9, 2024
2545bf4
rm mapping
pcrespov Dec 9, 2024
15e31b4
models for organizations
pcrespov Dec 9, 2024
8cec4b9
drops utils
pcrespov Dec 9, 2024
bab2277
cleanup
pcrespov Dec 9, 2024
6d03a79
update privacy
pcrespov Dec 9, 2024
12ad537
move adapters to schemas
pcrespov Dec 9, 2024
fd2c736
mypy
pcrespov Dec 9, 2024
98e846f
fixes caller
pcrespov Dec 9, 2024
aaf9c4a
gid
pcrespov Dec 9, 2024
604e6a5
hid email
pcrespov Dec 9, 2024
6d8c770
hide email
pcrespov Dec 9, 2024
5380899
updates OAS
pcrespov Dec 9, 2024
ebbd5c1
services/webserver api version: 0.48.0 → 0.49.0
pcrespov Dec 9, 2024
1e0e376
tests
pcrespov Dec 9, 2024
f0d9cbb
tests
pcrespov Dec 9, 2024
8bb03e6
adds tests for conversions
pcrespov Dec 10, 2024
9d38106
tests
pcrespov Dec 10, 2024
6630877
oas
pcrespov Dec 10, 2024
92a5cce
fixes tsets
pcrespov Dec 10, 2024
e4efff7
cleanup tests
pcrespov Dec 10, 2024
d260646
cleanup tests
pcrespov Dec 10, 2024
299f241
@odeimaiz review: adds username
pcrespov Dec 10, 2024
92e68b2
doc
pcrespov Dec 10, 2024
b020206
@sanderegg review:drop organization and renames
pcrespov Dec 10, 2024
37d35db
@sanderegg review:drop organization and renames
pcrespov Dec 10, 2024
0272554
fixes autoinclusion
pcrespov Dec 10, 2024
b836ab0
@sanderegg review: deprecation
pcrespov Dec 10, 2024
eb6071d
@odeimaiz review: deprecated inclusion rules
pcrespov Dec 10, 2024
401438e
TODO
pcrespov Dec 10, 2024
19a7c86
TODO
pcrespov Dec 10, 2024
63aefa7
cleanup
pcrespov Dec 10, 2024
b50842b
migration
pcrespov Dec 10, 2024
0009f95
fix query
pcrespov Dec 10, 2024
438c174
fix tests
pcrespov Dec 10, 2024
dd89a35
fixes tsts
pcrespov Dec 10, 2024
d1fd1d0
fixes tsts
pcrespov Dec 10, 2024
cee4f33
fixes tsts
pcrespov Dec 10, 2024
6d9e3fb
fixes tests
pcrespov Dec 10, 2024
e4a9810
Merge branch 'master' into is779/prep-users-in-groups
pcrespov Dec 10, 2024
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
Prev Previous commit
Next Next commit
cleanup
pcrespov committed Dec 10, 2024
commit 63aefa76cc04aa3fe6a2f2fec5c11f846c79d837
Original file line number Diff line number Diff line change
@@ -139,12 +139,16 @@ async def get_group_from_gid(
#


def _query_user_groups_with_read_access(query, user_id: UserID):
return query.select_from(
user_to_groups.join(groups, user_to_groups.c.gid == groups.c.gid),
).where(
(user_to_groups.c.uid == user_id)
& (user_to_groups.c.access_rights["read"].is_(True))
def _list_user_groups_with_read_access_query(*group_selection, user_id: UserID):
return (
sa.select(*group_selection, user_to_groups.c.access_rights)
.select_from(
user_to_groups.join(groups, user_to_groups.c.gid == groups.c.gid),
)
.where(
(user_to_groups.c.uid == user_id)
& (user_to_groups.c.access_rights["read"].is_(True))
)
)


@@ -162,9 +166,7 @@ async def get_all_user_groups_with_read_access(
standard_groups: list[GroupInfoTuple] = []
everyone_group: GroupInfoTuple | None = None

query = _query_user_groups_with_read_access(
sa.select(groups, user_to_groups.c.access_rights), user_id=user_id
)
query = _list_user_groups_with_read_access_query(groups, user_id=user_id)

async with pass_or_acquire_connection(get_asyncpg_engine(app), connection) as conn:
result = await conn.stream(query)
@@ -195,9 +197,8 @@ async def get_ids_of_all_user_groups_with_read_access(
user_id: UserID,
) -> list[GroupID]:
# thin version of `get_all_user_groups_with_read_access`
query = _query_user_groups_with_read_access(
sa.select(groups.c.gid, user_to_groups.c.access_rights), user_id=user_id
)

query = _list_user_groups_with_read_access_query(groups.c.gid, user_id=user_id)

async with pass_or_acquire_connection(get_asyncpg_engine(app), connection) as conn:
result = await conn.stream(query)

Unchanged files with check annotations Beta

openapi: 3.1.0

Check failure on line 1 in services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml

GitHub Actions / OAS backwards compatibility

Error when checking services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml
info:
title: simcore-service-webserver
description: Main service with an interface (http-API & websockets) to the web front-end