Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formalize husbandry group permissions #884

Open
4 tasks
k1o0 opened this issue Nov 20, 2024 · 0 comments
Open
4 tasks

Formalize husbandry group permissions #884

k1o0 opened this issue Nov 20, 2024 · 0 comments

Comments

@k1o0
Copy link
Collaborator

k1o0 commented Nov 20, 2024

Currently there is a hack for husbandry permissions in the BaseAdmin change permissions method:

alyx/alyx/alyx/base.py

Lines 382 to 388 in 95c2e40

# [CR 2024-03-12]
# HACK: following a request by Charu R from cortexlab, we authorize all users in the
# special Husbandry group to edit litters.
husbandry = 'husbandry' in ', '.join(_.name.lower() for _ in request.user.groups.all())
if husbandry:
if obj.__class__.__name__ in ('Litter', 'Subject', 'BreedingPair'):
return True

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:

@k1o0 k1o0 added this to the Improve Alyx permissions system milestone Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant