opensafely-core / opensafely-core/opencodelists
Can't create a new draft if another user has authored one
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 60
- Forks
- 16
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 17
Description
See this thread
Currently a draft is only editable by the draft author, even if it's owned by an organisation. A user in the same organisation can view the draft, but can't edit the tree in the builder view (this is also not very obvious - a message on the page to indicate that it's readonly would be nice).
The option to create a draft from a published/under-review version is also disabled if there's an existing draft (with any author).
This means that if user A has created a draft owned by a particular organisation, user B can see the published versions and the draft, but can't edit the draft, and also can't create a new one. Since the codelist is organisation-owned, there should be a way for a user to make a new version without having to contact the existing draft author and have them either delete or put their draft under review.
Options:
- Make drafts editable by all users in the organisation, not just the author
- Allow users to create a new draft if they haven't already authored one - this means there could be multiple drafts for a single codelist)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Slack thread and trace the draft edit and creation flows described in the issue; no files or tests are named. First resolve which organization behavior is intended, then verify that an organization user can make the permitted change and that the read-only state is clear when editing is not allowed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- authorization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100