Skip to content

Commit a8f12f1

Browse files
committed
@sanderegg review: doc
1 parent e759c8a commit a8f12f1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

services/web/server/src/simcore_service_webserver/groups/_groups_repository.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,21 @@ async def _get_group_and_access_rights_or_raise(
110110
group_id: GroupID,
111111
check_permission: Literal["read", "write", "delete"] | None,
112112
) -> Row:
113+
"""Fetches a group and its access rights for a specific user (caller_id).
114+
115+
Arguments:
116+
conn -- Database connection to use for the query.
117+
caller_id -- the user requesting the group information
118+
group_id -- ID of the group to fetch.
119+
check_permission -- Permission to check for the user on the group. If None, no permission check is performed.
120+
121+
Raises:
122+
GroupNotFoundError: if the group does not exist or the caller is not part of the group.
123+
UserInsufficientRightsError: if the user lacks the specified permission on the group.
124+
125+
Returns:
126+
Row containing the group details and access rights.
127+
"""
113128
result = await conn.execute(
114129
sa.select(
115130
*_GROUP_COLUMNS,

0 commit comments

Comments
 (0)