Skip to content

Formalize husbandry group permissions #884

@k1o0

Description

@k1o0

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions