-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Milestone
Description
Currently there is a hack for husbandry permissions in the BaseAdmin change permissions method:
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:
- 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 Document Alyx user permissions system #883)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels