Open cptanalatriste opened 1 month ago
@chrisdburr please check if this is the requested feature
Just adding the roles from #565 here for ease of access:
Role | Share Assurance Case | Manage Assurance Case (e.g. rename/delete) | Edit Assurance Case (e.g. add/edit elements or branches) | Add Comments | Download | View Assurance Case |
---|---|---|---|---|---|---|
Owner | x | x | x | x | x | x |
Editor | x | x | x | x | ||
Reviewer | x | x | x | |||
Viewer | x |
I'm not sure about the "requesting locking/unlocking" feature. Is there some alternative between this and the full real-time collaboration option?
Perhaps something like the following:
assurance_case_1
assurance_case_1
assurance_case_1
@cptanalatriste @RichGriff please let me know your thoughts.
Otherwise. I'm happy with the user story.
@cptanalatriste @chrisdburr can you both review this in staging
for me please, thanks
@cptanalatriste I'm unsure what the 'lock' means?
In staging currently, if the user who is accessing the case has edit permissions then they can do those actions.
@RichGriff it's based on the legacy version on doing concurrent edits, without people overriding each other work. Each assurance case has a "token" (the lock), that can be passed around all the users that have edit privileges over that case.
So, let's say you, @chrisdburr and me has edit privileges over case 7. If I want to edit/modify the case 7, I need to request the token before I start (if I don't have the token, every edit would fail). While I have the token, nor you or @chrisdburr would be able to edit the case, until I give the token to any of you.
If we want to go this route, we would need some GUI components to request the lock/token and see who has the token for a given case. As well as some backend components to provide this information.
@chrisdburr , are you OK with implementing a lock/token mechanism for edits?
@cptanalatriste and @RichGriff please can you discuss the feasibility and value of this approach, as compared with full support for websockets. I won't be able to meet next week due to annual leave, so we can come back to this in a fortnight once you have a clearer estimate.
Role
As an assurance case builder
Desired Feature
I want to be able to edit assurance cases shared with me
Benefit
So that I can work collaboratively on the development or review of an assurance case.
Acceptance Criteria
GIVEN that another user has shared an assurance case with me, with edit permissions WHEN I access this case, from the "Shared with me" section AND I have requested successfully the "lock" of the assurance case. THEN I can edit the description of any element AND I can add or remove new elements AND I can move, attach, re-attach elements AND I can export the case to JSON. AND I cannot share the case with other users.
GIVEN that another user has shared an assurance case with me, with edit permissions WHEN I access this case, from the "Shared with me" section AND I do not have the "lock" of the assurance case. THEN I cannot edit the description of any element AND I cannot add or remove new elements AND I cannot move, attach, re-attach elements AND I cannot export the case to JSON.
Dependencies
No response
Technical Notes
For an initial Proof-of-Concept, we will implement the following locking mechanism:
GET cases/<case-id>
, the JSON response will now include a"channel"
field, with the URL of the web socket to connect to. Each assurance case will have their own web socket channel.username
opens an assurance with idcase-id
that they own/have edit permissions, the frontend should send to the case's web socket channel the following message{"element": "case", "id": case-id, "action": "open", "username": username}
case-id
is being edited by userusername
. You cannot modify until they finish". For these users, the case will switch to read-only mode.case-id
, the frontend should send to the cases's web socket channel the following message{"element": "case", "id": case-id, "action": "close", "username": username}
case-id
is now available for editing". For these users, the case will reload and switch to edit mode (if they have permissions).This is just to get us started. On this foundation, we can build the following features:
Definition of Done