Closed chrisdburr closed 2 weeks ago
@cptanalatriste, as a reminder @nbarlowATI and @mhauru implemented a simple case sharing feature in the original version of the assurance platform so it may be worth looking at their original solution.
@chrisdburr , I'm meeting with Markus today, to check what's already in place.
@cptanalatriste @chrisdburr
Work in progress on the frontend development for this user story.
https://github.com/user-attachments/assets/05b7aad0-d5c6-467c-9188-0a5e1b880e4b
Looks good, @RichGriff.
Would it be appropriate to add another event handler to the Download File
button to close the modal once the file has been downloaded?
@chrisdburr I thought about this but figured users might still want to share the case with other user, as this mod has both options.
@chrisdburr I thought about this but figured users might still want to share the case with other user, as this mod has both options.
No worries. This crossed my mind as well. No strong preference between the two, so happy to leave it as is.
@RichGriff I deployed to staging
the backend services for this user story. Pleases check the PR description for technical details (https://github.com/alan-turing-institute/AssurancePlatform/pull/573) and let me know if further changes are needed
Updated UI for Sharing and also a new modal for Managing Permissions.
https://github.com/user-attachments/assets/4582623d-eaf2-4b5e-9333-8faa789683a9
@chrisdburr @cptanalatriste thoughts?
@RichGriff is looking great! Let us know when it's into staging
, so we can give it a try
@RichGriff is looking great! Let us know when it's into
staging
, so we can give it a try
Agreed. Thanks, @RichGriff.
@cptanalatriste is this feature in staging
We will modify the existing api/cases/ endpoint. Now, when performing GET api/cases/?shared=true will return the cases shared with the user invoking the endpoint.
Just want to test to see if users can see cases shared with them.
Update
Seems this hasn't been added - as a shared with my GitHub user and my shared cases come back empty.
@RichGriff , I build the endpoint for the "Shared with me" page. Please check this PR for technical details: https://github.com/alan-turing-institute/AssurancePlatform/pull/581
@RichGriff , per your request, the endpoint for case list now includes user permissions. Please see PR for technical details https://github.com/alan-turing-institute/AssurancePlatform/pull/583
This is all in staging
have moved to review
@chrisdburr
Can confirm it's working as discussed. Thanks 🙏
Just noting that a remaining task, which we can define in a new issue is how to handle the case where a user is trying to share a case with someone who is not an active user.
At present, they get an error that is likely to cause confusion because it is not explaining that the email is not registered as an active user (see below).
https://github.com/user-attachments/assets/46477b9f-b6e8-4b04-bdbd-6eba01a15c77
Will close this issue and open a new one as a bug.
Role
As an assurance case builder
Desired Feature
I want to be able to add other users to edit or access an assurance case
Benefit
So that I can work collaboratively on the development or review of an assurance case.
Acceptance Criteria
GIVEN I have an assurance case as a user, which I have created AND I know the username or email of another TEA platform user WHEN I click on the
Share/Export
button in either the TEA case editor or the TEA case manager, I am provided with a modal that allows me to share the case with another user. AND I am able to give the user either read or write access. AND This user is then able to access the case from within their account by clicking on the 'Shared With Me' section.Dependencies
No response
Technical Notes
cases/<assurance-case-id>/sharedwith
. This endpoint will only be accessible to the case creator, and supports the following operations:POST
with a JSON body of[{"email": <email>, "read_only": true}, {"email": <email>, "read_only": false}]
, for sharing an assurance with other users (use theread_only
field for enabling/disabling editing).PUT
with a JSON body of[{"email": <email>, "read_only": true}, {"email": <email>, "read_only": false}]
, for modifying the permissions of users that have access to the case.DELETE
with a JSON body of[{"email": <email>}, {"email": <email>}]
, for removing access to the case for specific users.GET
will return a JSON document with the format[{"email": < email >, "read_only": true}, {"email": <email>, "read_only": false}]
, containing the users with access to the current case.api/cases/
endpoint. Now, when performingGET api/cases/?shared=true
will return the cases shared with the user invoking the endpoint.Definition of Done