cortex-lab / cortex-lab/alyx

Formalize husbandry group permissions

Open
#884 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
52
Forks
12
Avg merge
1d 11h
Merged PRs (30d)
4

Description

Currently there is a hack for husbandry permissions in the BaseAdmin change permissions method: https://github.com/cortex-lab/alyx/blob/95c2e40de451f02b24e3b3de908a99e7ff513ec0/alyx/alyx/base.py#L382-L388

This is currently undocumented and only weakly matches by group name. This may be fix issue #657 although this user would need to know how to create such a group in Alyx.

Suggested actions:

  • Ascertain difference between stock manager and husbandry group (best to ask @charureddy)
  • Move this set of lines to a mixin, or at least to the individual model admin has_change_permission methods
  • Create the group in the set_user_permissions management command
  • Document this group in the Alyx user guide (see issue #883)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the husbandry permission logic in alyx/alyx/base.py around lines 382-388, then compare the set_user_permissions management command and the user guide referenced by issue #883. Clarify the difference between stock manager and husbandry groups, create the group through the command, and document it so issue #657 can be evaluated.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
authorization, backend, documentation
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.