File tree Expand file tree Collapse file tree 2 files changed +28
-6
lines changed
services/web/server/src/simcore_service_webserver/projects Expand file tree Collapse file tree 2 files changed +28
-6
lines changed Original file line number Diff line number Diff line change 3030
3131class _ProjectShare (InputSchema ):
3232 # TODO: move to models_library.api_schemas_webserver.groups together with the rest
33- user_email : EmailStr
33+ sharee_email : EmailStr
3434
3535 # sharing access
3636 read : bool
@@ -57,12 +57,19 @@ async def share_project(request: web.Request):
5757 req_ctx .user_id ,
5858 req_ctx .product_name ,
5959 path_params .project_id ,
60- body_params .user_email ,
60+ body_params .sharee_email ,
6161 ):
6262
63- # TODO: share project
64- if body_params .user_email :
65- raise NotImplementedError
63+ await _groups_service .share_project_by_email (
64+ app = request .app ,
65+ user_id = req_ctx .user_id ,
66+ project_id = path_params .project_id ,
67+ sharee_email = body_params .sharee_email ,
68+ read = body_params .read ,
69+ write = body_params .write ,
70+ delete = body_params .delete ,
71+ product_name = req_ctx .product_name ,
72+ )
6673
6774 return web .json_response (status = status .HTTP_204_NO_CONTENT )
6875
Original file line number Diff line number Diff line change 66from models_library .products import ProductName
77from models_library .projects import ProjectID
88from models_library .users import UserID
9- from pydantic import BaseModel
9+ from pydantic import BaseModel , EmailStr
1010
1111from ..users import api as users_service
1212from . import _groups_repository
@@ -170,6 +170,21 @@ async def delete_project_group(
170170 )
171171
172172
173+ async def share_project_by_email (
174+ app : web .Application ,
175+ * ,
176+ product_name : ProductName ,
177+ user_id : UserID , # sharer
178+ project_id : ProjectID , # shared
179+ sharee_email : EmailStr , # sharee
180+ # access-rights for sharing
181+ read : bool ,
182+ write : bool ,
183+ delete : bool ,
184+ ):
185+ raise NotImplementedError
186+
187+
173188### Operations without checking permissions
174189
175190
You can’t perform that action at this time.
0 commit comments