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

Animal and Person view roles #1479

Open
bobintetley opened this issue Jun 11, 2024 · 2 comments
Open

Animal and Person view roles #1479

bobintetley opened this issue Jun 11, 2024 · 2 comments
Labels
database Requires a database change feature good first issue Good issue for first time contributors popular
Milestone

Comments

@bobintetley
Copy link
Member

Similar to how we do for incidents, allow an option to turn on extra view permissions for animals and people.

This would allow for a role dropdown on animals and people records, where users can assign the only roles that are allowed to view that specific record.

A lot of people have asked for this over the years.

@bobintetley bobintetley added popular good first issue Good issue for first time contributors feature database Requires a database change labels Jun 11, 2024
@bobintetley bobintetley added this to the 49 milestone Jun 11, 2024
@bobintetley
Copy link
Member Author

The options should go under Remove->System->Remove fine-grained animal permissions, and Remove fine-grained person permissions (both set by default)

@bobintetley
Copy link
Member Author

bobintetley commented Jun 14, 2024

Like animalcontrol.py, animal.py and person.py will need their own reduce_find_results functions that are called by their find routines to throw away rows the user does not have permission to view. shelterview will need to call the animal one as well.

animal.py currently has a function get_location_filter_where_clause that does most of this, but it does it by some difficult logic and writing SQL. It would be a lot simpler if it were reimplemented as a reduce type function that throws away unwanted records the way that animalcontrol does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database Requires a database change feature good first issue Good issue for first time contributors popular
Projects
None yet
Development

No branches or pull requests

1 participant